You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "SiyaoIsHiding (via GitHub)" <gi...@apache.org> on 2025/07/02 23:40:16 UTC
[PR] Flaky tests [cassandra-java-driver]
SiyaoIsHiding opened a new pull request, #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045
(no comment)
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "absurdfarce (via GitHub)" <gi...@apache.org>.
absurdfarce commented on PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#issuecomment-4175127061
Jenkins run looks good... actually a lot better than normal since a lot of flaky tests are no longer failing! ;)
Calling this good.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "absurdfarce (via GitHub)" <gi...@apache.org>.
absurdfarce commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2914720773
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java:
##########
@@ -295,17 +298,20 @@ private void invalidationTestInner(
Consumer<CqlSession> setupCacheEntryTestBasic =
(session) -> {
- session.execute("CREATE TYPE test_type_1 (a text, b int)");
- session.execute("CREATE TYPE test_type_2 (c int, d text)");
- session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_1>)");
- session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_2>)");
+ session.execute("CREATE TYPE test_type_caching_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_caching_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_1>)");
+ session.execute(
+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_2>)");
Review Comment:
But don't we _have_ to change the table name since these tests don't clean up after themselves? Once you execute the tests for, say, basic you've already created test_type_1, test_type_2 and all the rest. Won't you have a conflict then if you try to create those types against the same Cassandra backend (since they were never removed)?
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "SiyaoIsHiding (via GitHub)" <gi...@apache.org>.
SiyaoIsHiding commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2306494222
##########
core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java:
##########
@@ -83,6 +83,19 @@ protected CqlPrepareAsyncProcessor(
});
}
+ protected CqlPrepareAsyncProcessor(
+ Optional<? extends DefaultDriverContext> context, CacheBuilder<Object, Object> cacheBuilder) {
+ this.cache = cacheBuilder.build();
+ context.ifPresent(
+ (ctx) -> {
+ LOG.info("Adding handler to invalidate cached prepared statements on type changes");
+ EventExecutor adminExecutor = ctx.getNettyOptions().adminEventExecutorGroup().next();
Review Comment:
@absurdfarce
CacheBuilder doesn't have a `strongValues()` method, so I guess our proposed solution about putting `strongValues()` to override the weak values wouldn't work.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "tolbertam (via GitHub)" <gi...@apache.org>.
tolbertam commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2975901380
##########
osgi-tests/src/test/java/com/datastax/oss/driver/internal/osgi/support/BundleOptions.java:
##########
@@ -51,23 +53,23 @@ public static CompositeOption applicationBundle() {
systemProperty("cassandra.contactpoints").value("127.0.0.1"),
systemProperty("cassandra.port").value("9042"),
systemProperty("cassandra.keyspace").value("test_osgi"),
- bundle("reference:file:target/classes"));
+ bundle("reference:file:target/classes").startLevel(3));
}
public static UrlProvisionOption driverCoreBundle() {
return bundle("reference:file:../core/target/classes");
}
public static UrlProvisionOption driverCoreShadedBundle() {
- return bundle("reference:file:../core-shaded/target/classes");
+ return bundle("reference:file:../core-shaded/target/classes").startLevel(1);
}
public static UrlProvisionOption driverQueryBuilderBundle() {
- return bundle("reference:file:../query-builder/target/classes");
+ return bundle("reference:file:../query-builder/target/classes").startLevel(2);
Review Comment:
Guessing that deferring these later than the shaded bundle (and other deps) allows these to more reliably depend on the guava dep being there?
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "absurdfarce (via GitHub)" <gi...@apache.org>.
absurdfarce commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2920835606
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java:
##########
@@ -295,17 +298,20 @@ private void invalidationTestInner(
Consumer<CqlSession> setupCacheEntryTestBasic =
(session) -> {
- session.execute("CREATE TYPE test_type_1 (a text, b int)");
- session.execute("CREATE TYPE test_type_2 (c int, d text)");
- session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_1>)");
- session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_2>)");
+ session.execute("CREATE TYPE test_type_caching_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_caching_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_1>)");
+ session.execute(
+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_2>)");
Review Comment:
Wait, is that how that works? I remembered that working differently. My recollection was that CcmBridge just controlled the ccm interaction and that the session rule was the entity that constrained ops to a given keyspace.
Yeah, as I read this SessionRule [can create a new keyspace](https://github.com/apache/cassandra-java-driver/blob/4.19.2/test-infra/src/main/java/com/datastax/oss/driver/api/testinfra/session/SessionRule.java#L151-L156) if the user specifies it in the builder but this IT [does not currently do so](https://github.com/apache/cassandra-java-driver/blob/4.19.2/integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java#L77-L84) and this PR doesn't change that behaviour.
I do agree we need a new keyspace per test (since without that the `create type` calls will definitely stomp on each other) but I don't think we're quite there yet are we?
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "tolbertam (via GitHub)" <gi...@apache.org>.
tolbertam commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2975977202
##########
core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java:
##########
@@ -64,14 +63,17 @@ public CqlPrepareAsyncProcessor() {
}
public CqlPrepareAsyncProcessor(@NonNull Optional<? extends DefaultDriverContext> context) {
- this(context, Functions.identity());
+ this(context, CacheBuilder::weakValues);
}
protected CqlPrepareAsyncProcessor(
Optional<? extends DefaultDriverContext> context,
Function<CacheBuilder<Object, Object>, CacheBuilder<Object, Object>> decorator) {
- CacheBuilder<Object, Object> baseCache = CacheBuilder.newBuilder().weakValues();
+ // CASSJAVA-104
+ // Note that the base cache does NOT use weak values like the one-arg constructor it previously
+ // does!
+ CacheBuilder<Object, Object> baseCache = CacheBuilder.newBuilder();
Review Comment:
```suggestion
// Use weakValues to evict prepared statements from the cache as soon are they are
// no longer referenced elsewhere.
this(context, CacheBuilder::weakValues);
}
protected CqlPrepareAsyncProcessor(
Optional<? extends DefaultDriverContext> context,
Function<CacheBuilder<Object, Object>, CacheBuilder<Object, Object>> decorator) {
CacheBuilder<Object, Object> baseCache = CacheBuilder.newBuilder();
```
Was a little confused by this. It looks like the 1-argument constructor is used by the codebase, and the 2 argument constructor is used by tests, by moving the weakValues to the 1arg constructor, this allows the tests to work around the cache values being evicted as soon as they are no longer referenced elsewhere.
Think it would be better to just add a comment in the 1-arg constructor where weakValue is declared so it will be more clear why it's used there.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "absurdfarce (via GitHub)" <gi...@apache.org>.
absurdfarce merged PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "SiyaoIsHiding (via GitHub)" <gi...@apache.org>.
SiyaoIsHiding commented on PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#issuecomment-4002931647
PR updated except the "basic/collection/tuple/nested" in table names
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "absurdfarce (via GitHub)" <gi...@apache.org>.
absurdfarce commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2886404795
##########
core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java:
##########
@@ -83,6 +83,19 @@ protected CqlPrepareAsyncProcessor(
});
}
+ protected CqlPrepareAsyncProcessor(
+ Optional<? extends DefaultDriverContext> context, CacheBuilder<Object, Object> cacheBuilder) {
+ this.cache = cacheBuilder.build();
+ context.ifPresent(
+ (ctx) -> {
+ LOG.info("Adding handler to invalidate cached prepared statements on type changes");
+ EventExecutor adminExecutor = ctx.getNettyOptions().adminEventExecutorGroup().next();
Review Comment:
Seems like there's an easier way to make that happen that doesn't involve introducing a parallel method to the one we've already exposed:
```
diff --git a/core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java b/core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java
index a3d11cff0..7948931f0 100644
--- a/core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java
+++ b/core/src/main/java/com/datastax/oss/driver/internal/core/cql/CqlPrepareAsyncProcessor.java
@@ -64,14 +64,18 @@ public class CqlPrepareAsyncProcessor
}
public CqlPrepareAsyncProcessor(@NonNull Optional<? extends DefaultDriverContext> context) {
- this(context, Functions.identity());
+ // In the default case we mark our underlying cache as using weak values
+ this(context, builder->builder.weakValues());
}
protected CqlPrepareAsyncProcessor(
Optional<? extends DefaultDriverContext> context,
Function<CacheBuilder<Object, Object>, CacheBuilder<Object, Object>> decorator) {
- CacheBuilder<Object, Object> baseCache = CacheBuilder.newBuilder().weakValues();
+ // Note that the base cache does NOT use weak values like the one-arg constructor above does! If
+ // you provide a decorator function for the CacheBuilder you must call weakValues() in that function
+ // if you want your cache to use weak values.
+ CacheBuilder<Object, Object> baseCache = CacheBuilder.newBuilder();
this.cache = decorator.apply(baseCache).build();
context.ifPresent(
(ctx) -> {
```
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java:
##########
@@ -295,17 +298,20 @@ private void invalidationTestInner(
Consumer<CqlSession> setupCacheEntryTestBasic =
(session) -> {
- session.execute("CREATE TYPE test_type_1 (a text, b int)");
- session.execute("CREATE TYPE test_type_2 (c int, d text)");
- session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_1>)");
- session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_2>)");
+ session.execute("CREATE TYPE test_type_caching_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_caching_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_1>)");
+ session.execute(
+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_2>)");
Review Comment:
Good job, former me 🤦
Should the names of the tables and types created here not follow the basic/collection/tuple/nested split we use for setupCacheEntryTest* method names throughout? Seems like this should be:
```
session.execute("CREATE TYPE test_type_basic_1 (a text, b int)");
session.execute("CREATE TYPE test_type_basic_2 (c int, d text)");
session.execute("CREATE TABLE test_table_basic_1 (e int primary key, f frozen<test_type_1>)");
session.execute("CREATE TABLE test_table_basic_2 (g int primary key, h frozen<test_type_2>)");
```
and so on if we _really_ want to avoid collisions.
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCancellationIT.java:
##########
@@ -50,6 +64,69 @@ public class PreparedStatementCancellationIT {
@Rule public TestRule chain = RuleChain.outerRule(ccmRule).around(sessionRule);
+ private static class TestCqlPrepareAsyncProcessor extends CqlPrepareAsyncProcessor {
+
+ public TestCqlPrepareAsyncProcessor(@NonNull Optional<DefaultDriverContext> context) {
+ // Default CqlPrepareAsyncProcessor uses weak values here as well. We avoid doing so
+ // to prevent cache entries from unexpectedly disappearing mid-test.
+ super(context, CacheBuilder.newBuilder());
Review Comment:
This would become:
```
super(context, Functions.identity())
```
given the change referenced above.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "SiyaoIsHiding (via GitHub)" <gi...@apache.org>.
SiyaoIsHiding commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2888202644
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java:
##########
@@ -295,17 +298,20 @@ private void invalidationTestInner(
Consumer<CqlSession> setupCacheEntryTestBasic =
(session) -> {
- session.execute("CREATE TYPE test_type_1 (a text, b int)");
- session.execute("CREATE TYPE test_type_2 (c int, d text)");
- session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_1>)");
- session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_2>)");
+ session.execute("CREATE TYPE test_type_caching_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_caching_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_1>)");
+ session.execute(
+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_2>)");
Review Comment:
`invalidationResultSetTest`, `invalidationVariableDefsTest`, and `invalidationTestInner` are shared among basic/collection/tuple/nested. They need to be refactored if we want to change the table names to specify basic/collection/tuple/nested. I don't think it's worth it, cuz test methods inside of one test suite won't run in parallel anyway
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "SiyaoIsHiding (via GitHub)" <gi...@apache.org>.
SiyaoIsHiding commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r3025368947
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java:
##########
@@ -295,17 +298,20 @@ private void invalidationTestInner(
Consumer<CqlSession> setupCacheEntryTestBasic =
(session) -> {
- session.execute("CREATE TYPE test_type_1 (a text, b int)");
- session.execute("CREATE TYPE test_type_2 (c int, d text)");
- session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_1>)");
- session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_2>)");
+ session.execute("CREATE TYPE test_type_caching_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_caching_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_1>)");
+ session.execute(
+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_2>)");
Review Comment:
`PreparedStatementCachingIT` had conflicts with `PreparedStatementCancellationIT`, as they are both `IsolatedTests` and were using the same table names.
UdtCodecIT is not relevant, as it's `ParallelizableTests`, not running in parallel with IsolatedTests.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "SiyaoIsHiding (via GitHub)" <gi...@apache.org>.
SiyaoIsHiding commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2915879950
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java:
##########
@@ -295,17 +298,20 @@ private void invalidationTestInner(
Consumer<CqlSession> setupCacheEntryTestBasic =
(session) -> {
- session.execute("CREATE TYPE test_type_1 (a text, b int)");
- session.execute("CREATE TYPE test_type_2 (c int, d text)");
- session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_1>)");
- session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_2>)");
+ session.execute("CREATE TYPE test_type_caching_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_caching_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_1>)");
+ session.execute(
+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_2>)");
Review Comment:
This test suite has a `@Rule` instead of a `@ClassRule`, that means for every test method, CCM bridge creates a separate keyspace and session.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "SiyaoIsHiding (via GitHub)" <gi...@apache.org>.
SiyaoIsHiding commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r3025393320
##########
osgi-tests/src/test/java/com/datastax/oss/driver/internal/osgi/support/BundleOptions.java:
##########
@@ -51,23 +53,23 @@ public static CompositeOption applicationBundle() {
systemProperty("cassandra.contactpoints").value("127.0.0.1"),
systemProperty("cassandra.port").value("9042"),
systemProperty("cassandra.keyspace").value("test_osgi"),
- bundle("reference:file:target/classes"));
+ bundle("reference:file:target/classes").startLevel(3));
}
public static UrlProvisionOption driverCoreBundle() {
return bundle("reference:file:../core/target/classes");
}
public static UrlProvisionOption driverCoreShadedBundle() {
- return bundle("reference:file:../core-shaded/target/classes");
+ return bundle("reference:file:../core-shaded/target/classes").startLevel(1);
}
public static UrlProvisionOption driverQueryBuilderBundle() {
- return bundle("reference:file:../query-builder/target/classes");
+ return bundle("reference:file:../query-builder/target/classes").startLevel(2);
Review Comment:
Yes, it was complaining some classes were not found
```
`com.datastax.oss.driver.api.osgi.service.MailboxService not found by PAXEXAM-PROBE-e72f8dd5-3084-4c86-9382-ca8b45cf1a68 [31]`
```
I'm not 100% sure how it works but this test never fails again after this fix
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "SiyaoIsHiding (via GitHub)" <gi...@apache.org>.
SiyaoIsHiding commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2989229358
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/reactive/DefaultReactiveResultSetIT.java:
##########
@@ -47,13 +47,11 @@
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
-import org.junit.experimental.categories.Category;
import org.junit.rules.RuleChain;
import org.junit.rules.TestRule;
import org.junit.runner.RunWith;
@RunWith(DataProviderRunner.class)
Review Comment:
To remind myself: add that `@Category(ParallelizableTests.class)` back
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "absurdfarce (via GitHub)" <gi...@apache.org>.
absurdfarce commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2986362215
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java:
##########
@@ -295,17 +298,20 @@ private void invalidationTestInner(
Consumer<CqlSession> setupCacheEntryTestBasic =
(session) -> {
- session.execute("CREATE TYPE test_type_1 (a text, b int)");
- session.execute("CREATE TYPE test_type_2 (c int, d text)");
- session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_1>)");
- session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_2>)");
+ session.execute("CREATE TYPE test_type_caching_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_caching_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_1>)");
+ session.execute(
+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_2>)");
Review Comment:
Oh, I get it now... the problem was that it was conflicting with UdtCodecIT, _not_ that it was conflicting with the four variations of the test executed by this IT. 🤦
I completely misunderstood the problem... I'm good with this now.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "absurdfarce (via GitHub)" <gi...@apache.org>.
absurdfarce commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2986344609
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java:
##########
@@ -295,17 +298,20 @@ private void invalidationTestInner(
Consumer<CqlSession> setupCacheEntryTestBasic =
(session) -> {
- session.execute("CREATE TYPE test_type_1 (a text, b int)");
- session.execute("CREATE TYPE test_type_2 (c int, d text)");
- session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_1>)");
- session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_2>)");
+ session.execute("CREATE TYPE test_type_caching_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_caching_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_1>)");
+ session.execute(
+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_2>)");
Review Comment:
Actually, as I look at this again... why would the changes to this test do _anything_ to fix the underlying problem? With the changes in this PR you still have _exactly_ the same name collisions we had in the previous test... now everything just collides with test_table_caching or test_type_caching instead of test_table and test_type.
Setting aside the question of session isolation (which I still don't think we have right) why... is this better?
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "SiyaoIsHiding (via GitHub)" <gi...@apache.org>.
SiyaoIsHiding commented on PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#issuecomment-4174161826
Addressed Andy's feedback, squashed. Ready to merge if Bret gives an explicit approval and if CI passes. I can't veiw CI anymore.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "absurdfarce (via GitHub)" <gi...@apache.org>.
absurdfarce commented on PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#issuecomment-4174647020
As mentioned earlier I'm satisfied as long as @tolbertam 's points have all been addressed... and it sounds like we're good there. +1 from me.
I'll kick off a Jenkins run just to make sure there isn't anything weird. Assuming there's nothing unusual there (and I'm not expecting anything) this will just go in.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] CASSJAVA-104: Fix Flaky tests [cassandra-java-driver]
Posted by "absurdfarce (via GitHub)" <gi...@apache.org>.
absurdfarce commented on code in PR #2045:
URL: https://github.com/apache/cassandra-java-driver/pull/2045#discussion_r2986362215
##########
integration-tests/src/test/java/com/datastax/oss/driver/core/cql/PreparedStatementCachingIT.java:
##########
@@ -295,17 +298,20 @@ private void invalidationTestInner(
Consumer<CqlSession> setupCacheEntryTestBasic =
(session) -> {
- session.execute("CREATE TYPE test_type_1 (a text, b int)");
- session.execute("CREATE TYPE test_type_2 (c int, d text)");
- session.execute("CREATE TABLE test_table_1 (e int primary key, f frozen<test_type_1>)");
- session.execute("CREATE TABLE test_table_2 (g int primary key, h frozen<test_type_2>)");
+ session.execute("CREATE TYPE test_type_caching_1 (a text, b int)");
+ session.execute("CREATE TYPE test_type_caching_2 (c int, d text)");
+ session.execute(
+ "CREATE TABLE test_table_caching_1 (e int primary key, f frozen<test_type_caching_1>)");
+ session.execute(
+ "CREATE TABLE test_table_caching_2 (g int primary key, h frozen<test_type_caching_2>)");
Review Comment:
Oh, I get it now... the problem was that it was conflicting with UdtCodecIT, _not_ that it was conflicting with the four variations of the test executed by this IT. I completely misunderstood the problem... I'm good with this now.
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org