Skip to content

Commit 40b7fc7

Browse files
committed
fix OkHttpWritableBufferAllocatorTest
1 parent d11b421 commit 40b7fc7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

okhttp/src/test/java/io/grpc/okhttp/OkHttpWritableBufferAllocatorTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import io.grpc.internal.WritableBuffer;
2222
import io.grpc.internal.WritableBufferAllocator;
2323
import io.grpc.internal.WritableBufferAllocatorTestBase;
24+
import okio.Segment;
2425
import org.junit.Test;
2526
import org.junit.runner.RunWith;
2627
import org.junit.runners.JUnit4;
@@ -42,7 +43,7 @@ protected WritableBufferAllocator allocator() {
4243
public void testCapacity() {
4344
WritableBuffer buffer = allocator().allocate(4096);
4445
assertEquals(0, buffer.readableBytes());
45-
assertEquals(4096, buffer.writableBytes());
46+
assertEquals(Segment.SIZE, buffer.writableBytes());
4647
}
4748

4849
@Test
@@ -56,6 +57,6 @@ public void testInitialCapacityHasMaximum() {
5657
public void testIsExactBelowMaxCapacity() {
5758
WritableBuffer buffer = allocator().allocate(4097);
5859
assertEquals(0, buffer.readableBytes());
59-
assertEquals(4097, buffer.writableBytes());
60+
assertEquals(Segment.SIZE, buffer.writableBytes());
6061
}
6162
}

0 commit comments

Comments
 (0)