You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ec...@apache.org on 2025/10/13 11:49:41 UTC

(flink-connector-cassandra) branch main updated (84c3fa0 -> bbc8019)

This is an automated email from the ASF dual-hosted git repository.

echauchot pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-cassandra.git


    from 84c3fa0  [FLINK-37937] Rebase on main and reference cassandraContainer1 instead of cassandraContainer
     new 1b94f6e  [FLINK-38485] Upgrade testContainers to v1.20.2 which is compiled with a commons-compress version closer to the one flink uses and keep commons-compress transitive dep exclusion to favor flink's.
     new bbc8019  [FLINK-38485] Make setup and teardown (test environment start/stop, tables creation, test data insertion) global for the whole test case instead of once per test to avoid too long test run.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 flink-connector-cassandra/pom.xml                      |  4 +++-
 .../table/CassandraDynamicTableSourceITCase.java       | 18 +++++++++---------
 2 files changed, 12 insertions(+), 10 deletions(-)


(flink-connector-cassandra) 01/02: [FLINK-38485] Upgrade testContainers to v1.20.2 which is compiled with a commons-compress version closer to the one flink uses and keep commons-compress transitive dep exclusion to favor flink's.

Posted by ec...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

echauchot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-cassandra.git

commit 1b94f6eb449c6eb9624ec382dd6cbd4dd896f33e
Author: Etienne Chauchot <ec...@apache.org>
AuthorDate: Wed Oct 8 11:23:48 2025 +0200

    [FLINK-38485] Upgrade testContainers to v1.20.2 which is compiled with a commons-compress version closer to the one flink uses and keep commons-compress transitive dep exclusion to favor flink's.
---
 flink-connector-cassandra/pom.xml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/flink-connector-cassandra/pom.xml b/flink-connector-cassandra/pom.xml
index 38d7177..1b760e4 100644
--- a/flink-connector-cassandra/pom.xml
+++ b/flink-connector-cassandra/pom.xml
@@ -44,7 +44,9 @@ under the License.
 		<junit5.version>5.8.1</junit5.version>
 		<assertj.version>3.23.1</assertj.version>
 		<archunit.version>1.0.0</archunit.version>
-		<testcontainers.version>1.18.3</testcontainers.version>
+		<!-- For dependency convergence we exclude testContainers commons-compress transitive dependency and keep only flink's.
+		Don't downgrade testcontainers otherwise the wrong commons-compress transitive dependency will lead to NoClassDefFound-->
+		<testcontainers.version>1.20.2</testcontainers.version>
 		<mockito.version>3.4.6</mockito.version>
 		<byte-buddy.version>1.12.10</byte-buddy.version>
 		<findbugs.version>1.3.9</findbugs.version>


(flink-connector-cassandra) 02/02: [FLINK-38485] Make setup and teardown (test environment start/stop, tables creation, test data insertion) global for the whole test case instead of once per test to avoid too long test run.

Posted by ec...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

echauchot pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-connector-cassandra.git

commit bbc80198f1386620f46d2186d054fd3172902a09
Author: Etienne Chauchot <ec...@apache.org>
AuthorDate: Wed Oct 8 13:45:31 2025 +0200

    [FLINK-38485] Make setup and teardown (test environment start/stop, tables creation, test data insertion) global for the whole test case instead of once per test to avoid too long test run.
---
 .../table/CassandraDynamicTableSourceITCase.java       | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/flink-connector-cassandra/src/test/java/org/apache/flink/connector/cassandra/table/CassandraDynamicTableSourceITCase.java b/flink-connector-cassandra/src/test/java/org/apache/flink/connector/cassandra/table/CassandraDynamicTableSourceITCase.java
index 2345b6e..61d84ec 100644
--- a/flink-connector-cassandra/src/test/java/org/apache/flink/connector/cassandra/table/CassandraDynamicTableSourceITCase.java
+++ b/flink-connector-cassandra/src/test/java/org/apache/flink/connector/cassandra/table/CassandraDynamicTableSourceITCase.java
@@ -26,9 +26,10 @@ import org.apache.flink.test.junit5.MiniClusterExtension;
 import org.apache.flink.types.Row;
 import org.apache.flink.util.CloseableIterator;
 
-import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInstance;
 import org.junit.jupiter.api.extension.ExtendWith;
 
 import java.math.BigDecimal;
@@ -43,12 +44,13 @@ import static org.assertj.core.api.Assertions.assertThat;
  * complex scenarios, edge cases, and error conditions.
  */
 @ExtendWith(MiniClusterExtension.class)
+@TestInstance(TestInstance.Lifecycle.PER_CLASS)
 class CassandraDynamicTableSourceITCase {
 
     private CassandraTestEnvironment cassandraTestEnvironment;
     private StreamTableEnvironment tableEnv;
 
-    @BeforeEach
+    @BeforeAll
     void setUp() throws Exception {
         cassandraTestEnvironment = new CassandraTestEnvironment(false);
         cassandraTestEnvironment.startUp();
@@ -60,11 +62,9 @@ class CassandraDynamicTableSourceITCase {
         insertAllTestData();
     }
 
-    @AfterEach
+    @AfterAll
     void tearDown() throws Exception {
-        if (cassandraTestEnvironment != null) {
-            cassandraTestEnvironment.tearDown();
-        }
+        cassandraTestEnvironment.tearDown();
     }
 
     private void createAllTestTables() {
@@ -1526,7 +1526,7 @@ class CassandraDynamicTableSourceITCase {
     @Test
     void testFieldProjectionAndQueryOptimization() throws Exception {
         String createFlinkTable =
-                "CREATE TABLE flink_primitives ("
+                "CREATE TABLE flink_projections ("
                         + "  id INT,"
                         + "  name STRING,"
                         + "  age INT,"
@@ -1549,7 +1549,7 @@ class CassandraDynamicTableSourceITCase {
                         + ")";
 
         tableEnv.executeSql(createFlinkTable);
-        Table result = tableEnv.sqlQuery("SELECT name, age FROM flink_primitives");
+        Table result = tableEnv.sqlQuery("SELECT name, age FROM flink_projections");
 
         List<Row> actualRows = collectResults(result, 2);