Skip to content

Commit c3db753

Browse files
committed
fix: stabilize CI integration tests
1 parent 432b826 commit c3db753

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/tests@v1.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ jobs:
247247
- name: Run integration tests on Cassandra (${{ steps.cassandra-version.outputs.value }}) - ${{ matrix.test-group }}
248248
id: run-integration-tests
249249
env:
250+
CASSANDRA_VERSION: ${{ matrix.cassandra-version }}
250251
CASSANDRA_VERSION_RESOLVED: ${{ steps.cassandra-version.outputs.value }}
252+
GH_TOKEN: ${{ github.token }}
251253
MAVEN_EXTRA_ARGS: ${{ steps.test-skip-args.outputs.value }}
252254
run: make test-integration-cassandra
253255

@@ -359,6 +361,7 @@ jobs:
359361
- name: Run integration tests on Scylla (${{ steps.scylla-version.outputs.value }}) - ${{ matrix.test-group }}
360362
id: run-integration-tests
361363
env:
364+
SCYLLA_VERSION: ${{ matrix.scylla-version }}
362365
SCYLLA_VERSION_RESOLVED: ${{ steps.scylla-version.outputs.value }}
363366
MAVEN_EXTRA_ARGS: ${{ steps.test-skip-args.outputs.value }}
364367
run: make test-integration-scylla

integration-tests/src/test/java/com/datastax/oss/driver/core/config/DriverExecutionProfileReloadIT.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,15 @@ public void should_reload_configuration_when_event_fired() {
124124
}
125125

126126
// Bump up request timeout to 10 seconds and trigger a manual reload.
127+
CountDownLatch latch = new CountDownLatch(1);
128+
((InternalDriverContext) session.getContext())
129+
.getEventBus()
130+
.register(ConfigChangeEvent.class, (e) -> latch.countDown());
131+
127132
configSource.set("basic.request.timeout = 10s");
128-
session.getContext().getConfigLoader().reload();
129-
waitForConfigChange(session, 500, TimeUnit.MILLISECONDS);
133+
assertThat(session.getContext().getConfigLoader().reload().toCompletableFuture().join())
134+
.isTrue();
135+
assertThat(latch.getCount()).isZero();
130136

131137
// Execute again, should not timeout.
132138
session.execute(query);

integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,12 +267,12 @@ private void invalidationTestInner(
267267
session.execute("ALTER TYPE test_type_2 add i blob");
268268

269269
// wait for latches and fail if they don't reach zero before timeout
270-
assertThat(Uninterruptibles.awaitUninterruptibly(typeChangeEventLatch, 10, TimeUnit.SECONDS))
270+
assertThat(Uninterruptibles.awaitUninterruptibly(typeChangeEventLatch, 30, TimeUnit.SECONDS))
271271
.withFailMessage("typeChangeEventLatch did not trigger before timeout")
272272
.isTrue();
273273
assertThat(
274274
Uninterruptibles.awaitUninterruptibly(
275-
preparedStmtCacheRemoveLatch, 10, TimeUnit.SECONDS))
275+
preparedStmtCacheRemoveLatch, 30, TimeUnit.SECONDS))
276276
.withFailMessage("preparedStmtCacheRemoveLatch did not trigger before timeout")
277277
.isTrue();
278278

0 commit comments

Comments
 (0)