File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
main/java/io/github/nstdio/http/ext
test/kotlin/io/github/nstdio/http/ext Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class DiskCache extends SizeConstrainedCache {
5151 this .metadataSerializer = metadataSerializer ;
5252 this .streamFactory = streamFactory ;
5353 this .dir = dir ;
54- this .executor = Executors .newSingleThreadExecutor ( r -> new Thread (r , "disk-cache-io" ));
54+ this .executor = Executors .newFixedThreadPool ( 1 , r -> new Thread (r , "disk-cache-io" ));
5555
5656 restore ();
5757 }
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ package io.github.nstdio.http.ext
1717
1818import io.kotest.matchers.types.shouldBeSameInstanceAs
1919import io.kotest.property.Arb
20- import io.kotest.property.arbitrary.int
2120import io.kotest.property.arbitrary.map
2221import io.kotest.property.arbitrary.next
2322import org.assertj.core.api.Assertions.assertThat
@@ -72,12 +71,17 @@ internal class BuffersTest {
7271 fun listBuffersData (): Stream <List <ByteBuffer >> {
7372 return Stream .of(
7473 listOf (),
75- listOf (" abcde" .repeat(16 ).toByteBuffer()),
74+ listOf (" abcde" .repeat(8 ).toByteBuffer()),
7675 listOf (
77- " ab" .repeat(16 ).toByteBuffer(),
78- " cd" .repeat(16 ).toByteBuffer()
76+ " ab" .repeat(8 ).toByteBuffer(),
77+ " cd" .repeat(8 ).toByteBuffer()
7978 ),
80- Arb .byteArray(Arb .int(96 , 96 )).next().toChunkedBuffers(true )
79+ listOf (
80+ " ab" .repeat(8 ).toByteBuffer(),
81+ " cd" .repeat(8 ).toByteBuffer(),
82+ " ef" .repeat(8 ).toByteBuffer()
83+ ),
84+ Arb .byteArray(96 ).next().toChunkedBuffers(true )
8185 )
8286 }
8387 }
You can’t perform that action at this time.
0 commit comments