mirror of https://github.com/apache/archiva.git
Changing timeout parameter for cassandra driver
This commit is contained in:
parent
699920cb89
commit
20918cb383
|
@ -129,6 +129,9 @@ public class DefaultCassandraArchivaManager
|
|||
@Value( "${cassandra.maxActive}" )
|
||||
private int maxActive;
|
||||
|
||||
@Value( "${cassandra.driverTimeoutMs}" )
|
||||
private int driverTimeoutMs;
|
||||
|
||||
@Value( "${cassandra.readConsistencyLevel}" )
|
||||
private String readConsistencyLevel;
|
||||
|
||||
|
@ -186,7 +189,7 @@ public class DefaultCassandraArchivaManager
|
|||
.withInt( DefaultDriverOption.CONNECTION_POOL_REMOTE_SIZE, maxActive )
|
||||
//.withInt( DefaultDriverOption.CONNECTION_MAX_REQUESTS, maxActive )
|
||||
.withString( DefaultDriverOption.REQUEST_CONSISTENCY, readConsistencyLevel )
|
||||
.withDuration( DefaultDriverOption.REQUEST_TIMEOUT, Duration.ofSeconds( 10 ) )
|
||||
.withDuration( DefaultDriverOption.REQUEST_TIMEOUT, Duration.ofMillis( driverTimeoutMs ) )
|
||||
.build( );
|
||||
|
||||
{
|
||||
|
|
|
@ -24,5 +24,6 @@ cassandra.writeConsistencyLevel=QUORUM
|
|||
cassandra.replicationFactor=1
|
||||
cassandra.keyspace.name=ArchivaKeySpace
|
||||
cassandra.cluster.name=archiva
|
||||
cassandra.driverTimeoutMs=20000
|
||||
|
||||
archiva.cassandra.configuration.file=./archiva-cassandra.properties
|
|
@ -92,9 +92,9 @@ public class CassandraMetadataRepositoryTest
|
|||
throws Exception
|
||||
{
|
||||
cTime = System.currentTimeMillis( );
|
||||
System.err.println( "Setting up "+(testNum++) + " - " + testInfo.getDisplayName() );
|
||||
System.err.println( "Setting up - "+(testNum++) + " - " + testInfo.getDisplayName() + " - 0ms");
|
||||
super.setUp();
|
||||
System.err.println( "Setting up 2 " + testInfo.getDisplayName( ) + " - " + (System.currentTimeMillis( ) - cTime) );
|
||||
System.err.println( "Setting up - " + testInfo.getDisplayName( ) + " - " + (System.currentTimeMillis( ) - cTime) +"ms");
|
||||
assertMaxTries =1;
|
||||
assertRetrySleepMs=10;
|
||||
|
||||
|
@ -124,7 +124,7 @@ public class CassandraMetadataRepositoryTest
|
|||
clearReposAndNamespace( cassandraArchivaManager );
|
||||
clearedTables.set( true );
|
||||
}
|
||||
System.err.println( "Finished setting up "+testInfo.getDisplayName() + " - " + (System.currentTimeMillis( ) - cTime) );
|
||||
System.err.println( "Finished setting up - "+testInfo.getDisplayName() + " - " + (System.currentTimeMillis( ) - cTime) +"ms");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -163,11 +163,11 @@ public class CassandraMetadataRepositoryTest
|
|||
public void shutdown(TestInfo testInfo)
|
||||
throws Exception
|
||||
{
|
||||
System.err.println( "Shutting down " + testInfo.getDisplayName( ) + " - " + ( System.currentTimeMillis( ) - cTime ) );
|
||||
System.err.println( "Shutting down - " + (testNum-1) + " - " + testInfo.getDisplayName( ) + " - " + ( System.currentTimeMillis( ) - cTime ) +"ms");
|
||||
clearReposAndNamespace( cassandraArchivaManager );
|
||||
clearedTables.set( true );
|
||||
super.tearDown();
|
||||
System.err.println( "Shutting down finished" + testInfo.getDisplayName( ) + " - " + ( System.currentTimeMillis( ) - cTime ) );
|
||||
System.err.println( "Shutting down finished - " + testInfo.getDisplayName( ) + " - " + ( System.currentTimeMillis( ) - cTime ) +"ms");
|
||||
}
|
||||
|
||||
static void clearReposAndNamespace( CassandraArchivaManager cassandraArchivaManager )
|
||||
|
|
Loading…
Reference in New Issue