JeetKunDoug commented on code in PR #74:
URL: https://github.com/apache/cassandra-sidecar/pull/74#discussion_r1379301603
##########
src/test/integration/org/apache/cassandra/sidecar/testing/IntegrationTestBase.java:
##########
@@ -158,9 +216,30 @@ protected void createTestKeyspace()
protected void createTestKeyspace(Map<String, Integer> rf)
{
- Session session = maybeGetSession();
- session.execute("CREATE KEYSPACE " + TEST_KEYSPACE +
- " WITH REPLICATION = { 'class' :
'NetworkTopologyStrategy', " + generateRfString(rf) + " };");
+ int attempts = 1;
+ ArrayList<Throwable> thrown = new ArrayList<>(5);
+ while (attempts <= 5)
+ {
+ try
+ {
+ Session session = maybeGetSession();
+
+ session.execute("CREATE KEYSPACE IF NOT EXISTS " +
TEST_KEYSPACE +
Review Comment:
Because `maybeGetSession` returns `null` in certain caseses where it's not
yet connected/the adapter isn't created. Again, may be helped with
CASSANDRASC-80?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]