]> source.dussan.org Git - archiva.git/commitdiff
Trying to tune cassandra tests
authorMartin Stockhammer <martin_s@apache.org>
Sun, 29 Aug 2021 13:19:37 +0000 (15:19 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Sun, 29 Aug 2021 13:19:37 +0000 (15:19 +0200)
archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/pom.xml
archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/main/resources/default-archiva-cassandra.properties
archiva-modules/metadata/metadata-store-provider/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/CassandraMetadataRepositoryTest.java

index 477482870f1388bf22a6e092276ae91b695736c7..5ac5c6c3b134dd62498de7094f3e3cfe96f06f39 100644 (file)
               <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>
index 220e501a216d524a11927ab84f40691bb1c26b6e..ec4beb3428ca87c2c7ab926475ce40877870524f 100644 (file)
@@ -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
index 71636efb422637dc29a6cdcb378bf6153d632512..ccdb3039f36fcf8a495f65187267a8a55a2f7df5 100644 (file)
@@ -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( )
                 ;
             }