JeetKunDoug commented on code in PR #74:
URL: https://github.com/apache/cassandra-sidecar/pull/74#discussion_r1379299515
##########
src/test/integration/org/apache/cassandra/sidecar/testing/IntegrationTestBase.java:
##########
@@ -68,28 +70,40 @@
*/
public abstract class IntegrationTestBase
{
- protected Logger logger = LoggerFactory.getLogger(this.getClass());
- protected Vertx vertx;
- protected Server server;
-
protected static final String TEST_KEYSPACE = "testkeyspace";
- private static final String TEST_TABLE_PREFIX = "testtable";
-
protected static final int DEFAULT_RF = 3;
+ private static final String TEST_TABLE_PREFIX = "testtable";
private static final AtomicInteger TEST_TABLE_ID = new AtomicInteger(0);
+ protected Logger logger = LoggerFactory.getLogger(this.getClass());
+ protected Vertx vertx;
+ protected Server server;
protected CassandraSidecarTestContext sidecarTestContext;
+ protected Injector injector;
+ private long healthCheckTimerId;
+ private InstancesConfig instancesConfig;
+
+ private static QualifiedTableName uniqueTestTableFullName()
+ {
+ return new QualifiedTableName(TEST_KEYSPACE, TEST_TABLE_PREFIX +
TEST_TABLE_ID.getAndIncrement());
+ }
@BeforeEach
- void setup(AbstractCassandraTestContext cassandraTestContext) throws
InterruptedException
+ void setup(AbstractCassandraTestContext cassandraTestContext, TestInfo
testInfo) throws InterruptedException
{
IntegrationTestModule integrationTestModule = new
IntegrationTestModule();
- Injector injector = Guice.createInjector(Modules.override(new
MainModule()).with(integrationTestModule));
+ System.setProperty("cassandra.testtag",
testInfo.getTestClass().get().getCanonicalName());
+ System.setProperty("suitename", testInfo.getDisplayName() + ": " +
cassandraTestContext.version);
+ int clusterSize = cassandraTestContext.clusterSize();
+ injector = Guice.createInjector(Modules.override(new
MainModule()).with(integrationTestModule));
vertx = injector.getInstance(Vertx.class);
- sidecarTestContext = CassandraSidecarTestContext.from(vertx,
cassandraTestContext, DnsResolver.DEFAULT);
+ sidecarTestContext = CassandraSidecarTestContext.from(vertx,
cassandraTestContext, DnsResolver.DEFAULT,
+
getNumInstancesToManage(clusterSize));
+
integrationTestModule.setCassandraTestContext(sidecarTestContext);
+ instancesConfig = getInstancesConfig();
server = injector.getInstance(Server.class);
-
+ vertx = injector.getInstance(Vertx.class);
Review Comment:
probably bad rebase - thanks for catching it.
--
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]