aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2021-08-29 15:19:37 +0200
committerMartin Stockhammer <martin_s@apache.org>2021-08-29 15:19:37 +0200
commit7c4835ba140de0e30746852a8ff64db442e02065 (patch)
treeb6417f3ffc3470b2e48f89632c93a565974b59f5
parentd0aa5dd63718373102f89f87f37d2201e350e59d (diff)
downloadarchiva-7c4835ba140de0e30746852a8ff64db442e02065.tar.gz
archiva-7c4835ba140de0e30746852a8ff64db442e02065.zip
Trying to tune cassandra tests
-rw-r--r--archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/pom.xml13
-rw-r--r--archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/main/resources/default-archiva-cassandra.properties2
-rw-r--r--archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java5
3 files changed, 13 insertions, 7 deletions
diff --git a/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/pom.xml b/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/pom.xml
index 477482870..5ac5c6c3b 100644
--- a/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/pom.xml
+++ b/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/pom.xml
@@ -398,13 +398,16 @@
<startNativeTransport>true</startNativeTransport>
<logLevel>INFO</logLevel>
<loadAfterFirstStart>false</loadAfterFirstStart>
- <yaml>
- broadcast_rpc_address: 127.0.0.1
- </yaml>
<systemPropertyVariables>
- <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
+ <cassandra.jmx.local.port>${cassandra.jmxPort}</cassandra.jmx.local.port>
</systemPropertyVariables>
-
+ <yaml><![CDATA[rpc_address: 127.0.0.1
+broadcast_rpc_address: 127.0.0.1
+listen_address: 127.0.0.1
+auto_snapshot: false
+snapshot_before_compaction: false
+num_tokens: 1
+]]></yaml>
</configuration>
</execution>
<execution>
diff --git a/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/main/resources/default-archiva-cassandra.properties b/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/main/resources/default-archiva-cassandra.properties
index 220e501a2..ec4beb342 100644
--- a/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/main/resources/default-archiva-cassandra.properties
+++ b/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/main/resources/default-archiva-cassandra.properties
@@ -24,6 +24,6 @@ cassandra.writeConsistencyLevel=QUORUM
cassandra.replicationFactor=1
cassandra.keyspace.name=ArchivaKeySpace
cassandra.cluster.name=archiva
-cassandra.driverTimeoutMs=20000
+cassandra.driverTimeoutMs=60000
archiva.cassandra.configuration.file=./archiva-cassandra.properties \ No newline at end of file
diff --git a/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java b/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
index 71636efb4..ccdb3039f 100644
--- a/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
+++ b/archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java
@@ -191,8 +191,11 @@ public class CassandraMetadataRepositoryTest
);
CompletableFuture.allOf( tables.stream( ).map( table -> session.executeAsync( truncate( table ).build( ) ) )
.map( CompletionStage::toCompletableFuture ).collect( Collectors.toList( ) ).toArray( new CompletableFuture[0] ) )
- .thenAccept( ( c ) -> {
+ .whenComplete( ( c, e ) -> {
if ( clearedFlag != null ) clearedFlag.set( true );
+ if (e!=null) {
+ System.err.println( "TRUNCATE ERROR DETECTED: " + e.getMessage( ) );
+ }
} ).get( )
;
}