Skip to content

Commit

Permalink
Fix flaky page cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvest committed Mar 1, 2016
1 parent 2617939 commit 4e1d6f9
Showing 1 changed file with 14 additions and 2 deletions.
Expand Up @@ -3641,7 +3641,13 @@ public void mustCopyIntoSameSizedWritePageCursor() throws Exception
while ( cursorA.next() )
{
assertTrue( cursorB.next() );
assertThat( cursorA.copyTo( 0, cursorB, 0, cursorA.getCurrentPageSize() ), is( pageSize ) );
int bytesCopied;
do
{
bytesCopied = cursorA.copyTo( 0, cursorB, 0, cursorA.getCurrentPageSize() );
}
while ( cursorA.shouldRetry() );
assertThat( bytesCopied, is( pageSize ) );
}
}

Expand All @@ -3655,7 +3661,13 @@ public void mustCopyIntoSameSizedWritePageCursor() throws Exception
{
assertTrue( cursor.next() );
}
assertThat( cursor.getByte(), is( (byte) i ) );
byte b;
do
{
b = cursor.getByte();
}
while( cursor.shouldRetry() );
assertThat( b, is( (byte) i ) );
}
}
}
Expand Down

0 comments on commit 4e1d6f9

Please sign in to comment.