Skip to content

Commit 0751e0f

Browse files
committed
Raise the sleep time to make sure tests do pass
1 parent 566c4f4 commit 0751e0f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/test/java/org/codehaus/plexus/util/io/CachingOutputStreamTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void testWriteNoExistingFile() throws IOException, InterruptedException
6161
assertArrayEquals( data, read );
6262
FileTime modified = Files.getLastModifiedTime( path );
6363

64-
Thread.sleep( 100 );
64+
Thread.sleep( 250 );
6565

6666
try ( CachingOutputStream cos = new CachingOutputStream( path, 4 ) )
6767
{
@@ -73,7 +73,7 @@ public void testWriteNoExistingFile() throws IOException, InterruptedException
7373
FileTime newModified = Files.getLastModifiedTime( path );
7474
assertEquals( modified, newModified );
7575

76-
Thread.sleep( 100 );
76+
Thread.sleep( 250 );
7777

7878
// write longer data
7979
data = "Good morning!".getBytes( StandardCharsets.UTF_8 );
@@ -88,7 +88,7 @@ public void testWriteNoExistingFile() throws IOException, InterruptedException
8888
assertNotEquals( modified, newModified );
8989
modified = newModified;
9090

91-
Thread.sleep( 100 );
91+
Thread.sleep( 250 );
9292

9393
// different data same size
9494
data = "Good mornong!".getBytes( StandardCharsets.UTF_8 );
@@ -103,7 +103,7 @@ public void testWriteNoExistingFile() throws IOException, InterruptedException
103103
assertNotEquals( modified, newModified );
104104
modified = newModified;
105105

106-
Thread.sleep( 100 );
106+
Thread.sleep( 250 );
107107

108108
// same data but shorter
109109
data = "Good mornon".getBytes( StandardCharsets.UTF_8 );

src/test/java/org/codehaus/plexus/util/io/CachingWriterTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void testWriteNoExistingFile() throws IOException, InterruptedException
6161
assertEquals( data, read );
6262
FileTime modified = Files.getLastModifiedTime( path );
6363

64-
Thread.sleep( 100 );
64+
Thread.sleep( 250 );
6565

6666
try ( CachingWriter cos = new CachingWriter( path, StandardCharsets.UTF_8, 4 ) )
6767
{
@@ -73,7 +73,7 @@ public void testWriteNoExistingFile() throws IOException, InterruptedException
7373
FileTime newModified = Files.getLastModifiedTime( path );
7474
assertEquals( modified, newModified );
7575

76-
Thread.sleep( 100 );
76+
Thread.sleep( 250 );
7777

7878
// write longer data
7979
data = "Good morning!";
@@ -88,7 +88,7 @@ public void testWriteNoExistingFile() throws IOException, InterruptedException
8888
assertNotEquals( modified, newModified );
8989
modified = newModified;
9090

91-
Thread.sleep( 100 );
91+
Thread.sleep( 250 );
9292

9393
// different data same size
9494
data = "Good mornong!";
@@ -103,7 +103,7 @@ public void testWriteNoExistingFile() throws IOException, InterruptedException
103103
assertNotEquals( modified, newModified );
104104
modified = newModified;
105105

106-
Thread.sleep( 100 );
106+
Thread.sleep( 250 );
107107

108108
// same data but shorter
109109
data = "Good mornon";

0 commit comments

Comments
 (0)