Skip to content

Commit

Permalink
Speed up tests in the IO module
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvest committed Dec 11, 2017
1 parent d500394 commit 6423ac5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Expand Up @@ -112,7 +112,7 @@ protected abstract void performReadOrUpdate( ThreadLocalRandom rng, boolean upda
int pf_flags ) throws IOException;
}

@RepeatRule.Repeat( times = 250 )
@RepeatRule.Repeat( times = 50 )
@Test( timeout = SEMI_LONG_TIMEOUT_MILLIS )
public void mustNotLoseUpdates() throws Exception
{
Expand Down Expand Up @@ -482,7 +482,7 @@ public void writeLockingCursorMustThrowWhenLockingPageRacesWithUnmapping() throw
}
}

@RepeatRule.Repeat( times = 100 )
@RepeatRule.Repeat( times = 20 )
@Test( timeout = LONG_TIMEOUT_MILLIS )
public void pageCacheMustRemainInternallyConsistentWhenGettingRandomFailures() throws Exception
{
Expand Down
Expand Up @@ -360,7 +360,7 @@ public void writesFlushedFromPageFileMustBeObservableEvenWhenRacingWithEviction(

long startPageId = 0;
long endPageId = 21;
int iterations = 10000;
int iterations = 500;
int shortsPerPage = pageCachePageSize / 2;

try ( PagedFile pagedFile = cache.map( file( "a" ), pageCachePageSize ) )
Expand Down Expand Up @@ -5021,7 +5021,7 @@ public void readableByteChannelMustReadAllBytesInFile() throws Exception
}
}

@RepeatRule.Repeat( times = 20 )
@RepeatRule.Repeat( times = 5 )
@Test( timeout = SHORT_TIMEOUT_MILLIS )
public void readableByteChannelMustReadAllBytesInFileConsistently() throws Exception
{
Expand Down
Expand Up @@ -116,7 +116,7 @@ protected final T createPageCache( PageSwapperFactory swapperFactory, int maxPag
T pageCache = fixture.createPageCache( swapperFactory, maxPages, tracer, cursorTracerSupplier );
pageCachePageSize = pageCache.pageSize();
recordsPerFilePage = pageCachePageSize / recordSize;
recordCount = 25 * maxPages * recordsPerFilePage;
recordCount = 5 * maxPages * recordsPerFilePage;
filePageSize = recordsPerFilePage * recordSize;
bufA = ByteBuffer.allocate( recordSize );
return pageCache;
Expand Down
Expand Up @@ -153,7 +153,7 @@ public void concurrentFlushingWithMischiefMustNotPutInterleavedDataIntoFile() th
public void concurrentFlushingWithFailuresMustNotPutInterleavedDataIntoFile() throws Exception
{
final RecordFormat recordFormat = new StandardRecordFormat();
final int filePageCount = 20_000;
final int filePageCount = 2_000;
try ( RandomPageCacheTestHarness harness = new RandomPageCacheTestHarness() )
{
harness.setConcurrencyLevel( 16 );
Expand All @@ -164,7 +164,7 @@ public void concurrentFlushingWithFailuresMustNotPutInterleavedDataIntoFile() th
harness.setCachePageCount( filePageCount / 2 );
harness.setFilePageCount( filePageCount );
harness.setInitialMappedFiles( 3 );
harness.setCommandCount( 150_000 );
harness.setCommandCount( 15_000 );
harness.setFileSystem( fs );
harness.disableCommands( MapFile, UnmapFile, ReadRecord, ReadMulti );
harness.setVerification( filesAreCorrectlyWrittenVerification( recordFormat, filePageCount ) );
Expand Down Expand Up @@ -202,5 +202,4 @@ private Phase filesAreCorrectlyWrittenVerification( final RecordFormat recordFor
}
};
}

}

0 comments on commit 6423ac5

Please sign in to comment.