Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cassandra 5 support #234

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11' ]
java: [ '11', '17' ]
name: Java ${{ matrix.java }} code analysis
steps:
- name: Checkout
Expand All @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11' ]
java: [ '11', '17' ]
name: Java ${{ matrix.java }} unit test
steps:
- name: Checkout
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11' ]
java: [ '11', '17' ]
name: Java ${{ matrix.java }} integration tests
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ericsson.bss.cassandra.ecaudit</groupId>
<artifactId>parent_c4.1</artifactId>
<artifactId>parent_c5.0</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<artifactId>common_c4.1</artifactId>
<artifactId>common_c5.0</artifactId>
<packaging>jar</packaging>

<name>Ericsson Cassandra Audit - Common</name>
Expand Down
4 changes: 2 additions & 2 deletions ecaudit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ericsson.bss.cassandra.ecaudit</groupId>
<artifactId>parent_c4.1</artifactId>
<artifactId>parent_c5.0</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<artifactId>ecaudit_c4.1</artifactId>
<artifactId>ecaudit_c5.0</artifactId>
<packaging>jar</packaging>

<name>Ericsson Cassandra Audit - Plug-in</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import java.nio.ByteBuffer;

import org.apache.cassandra.cql3.ColumnSpecification;
import org.apache.cassandra.transport.ProtocolVersion;

/**
* This logic is extracted to a flavor specific adapter.
Expand All @@ -35,6 +34,6 @@ private CqlLiteralFlavorAdapter()

static String toCQLLiteral(ByteBuffer serializedValue, ColumnSpecification column)
{
return column.type.asCQL3Type().toCQLLiteral(serializedValue, ProtocolVersion.CURRENT);
return column.type.asCQL3Type().toCQLLiteral(serializedValue);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void testSyncTimeout() throws UnknownHostException
assertWaitTimeInMillis(startTime, RETRY_INTERVAL_MILLIS);
}

@Test(timeout = (2 * RETRY_INTERVAL_MILLIS) - 1)
@Test(timeout = (3 * RETRY_INTERVAL_MILLIS) - 1)
public void testNoLocalSchemaInFirstTry() throws UnknownHostException
{
givenLocalStateOrder(null, currentEndpointState);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void testParseGrantModifyUppercaseAndSpace()
public void testParseGrantAll()
{
Set<Permission> operations = parser.parseTargetOperation("grant_audit_whitelist_for_all", DataResource.fromName("data"));
assertThat(operations).containsExactlyInAnyOrder(Permission.CREATE, Permission.ALTER, Permission.DROP, Permission.SELECT, Permission.MODIFY, Permission.AUTHORIZE);
assertThat(operations).containsExactlyInAnyOrder(Permission.CREATE, Permission.ALTER, Permission.DROP, Permission.SELECT, Permission.MODIFY, Permission.AUTHORIZE, Permission.UNMASK, Permission.SELECT_MASKED);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Object[][] testToCQLLiteral_parameters()
{ TimestampType.instance, EMPTY_BUFFER, "null" },
{ UTF8Type.instance, UTF8Type.instance.fromString("Kalle"), "'Kalle'" },
{ AsciiType.instance, AsciiType.instance.fromString("Anka"), "'Anka'" },
{ TimestampType.instance, TimestampType.instance.fromTimeInMillis(42), "1970-01-01T00:00:00.042Z" }, // 42 ms after EPOCH
{ TimestampType.instance, TimestampType.instance.fromTimeInMillis(42), "'1970-01-01T00:00:00.042Z'" }, // 42 ms after EPOCH
{ BooleanType.instance, BooleanType.instance.fromString("True"), "true" },
{ BytesType.instance, BytesType.instance.fromString("AABBCCDD"), "0xaabbccdd" },
};
Expand Down
4 changes: 2 additions & 2 deletions eclog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ericsson.bss.cassandra.ecaudit</groupId>
<artifactId>parent_c4.1</artifactId>
<artifactId>parent_c5.0</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<artifactId>eclog_c4.1</artifactId>
<artifactId>eclog_c5.0</artifactId>
<packaging>jar</packaging>

<name>Ericsson Cassandra Audit - Log Tool</name>
Expand Down
72 changes: 32 additions & 40 deletions integration-test-allow-all-authorizer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ericsson.bss.cassandra.ecaudit</groupId>
<artifactId>parent_c4.1</artifactId>
<artifactId>parent_c5.0</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<artifactId>integration-test-allow-all-authorizer_c4.1</artifactId>
<artifactId>integration-test-allow-all-authorizer_c5.0</artifactId>

<name>Ericsson Cassandra Audit - Allow All Authorizer IT</name>

Expand Down Expand Up @@ -61,44 +61,6 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>jdk11</id>
<activation>
<jdk>11</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<argLine>
${argLine}
-Djdk.attach.allowAttachSelf=true
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
--add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.server=ALL-UNNAMED
--add-exports java.sql/java.sql=ALL-UNNAMED
--add-opens java.base/java.lang.module=ALL-UNNAMED
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
--add-opens java.base/jdk.internal.math=ALL-UNNAMED
--add-opens java.base/jdk.internal.module=ALL-UNNAMED
--add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand All @@ -108,6 +70,36 @@
<configuration>
<forkCount>1</forkCount>
<reuseForks>true</reuseForks>
<argLine>
${argLine}
-Djdk.attach.allowAttachSelf=true
--add-exports java.base/java.lang.ref=ALL-UNNAMED
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
--add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.server=ALL-UNNAMED
--add-exports java.sql/java.sql=ALL-UNNAMED
--add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.lang.module=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
--add-opens java.base/jdk.internal.math=ALL-UNNAMED
--add-opens java.base/jdk.internal.module=ALL-UNNAMED
--add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac=ALL-UNNAMED
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
</argLine>
</configuration>
<executions>
<execution>
Expand Down
72 changes: 32 additions & 40 deletions integration-test-query-logger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ericsson.bss.cassandra.ecaudit</groupId>
<artifactId>parent_c4.1</artifactId>
<artifactId>parent_c5.0</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<artifactId>integration-test-query-logger_c4.1</artifactId>
<artifactId>integration-test-query-logger_c5.0</artifactId>

<name>Ericsson Cassandra Audit - Query Logger IT</name>

Expand Down Expand Up @@ -61,44 +61,6 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>jdk11</id>
<activation>
<jdk>11</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<argLine>
${argLine}
-Djdk.attach.allowAttachSelf=true
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
--add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.server=ALL-UNNAMED
--add-exports java.sql/java.sql=ALL-UNNAMED
--add-opens java.base/java.lang.module=ALL-UNNAMED
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
--add-opens java.base/jdk.internal.math=ALL-UNNAMED
--add-opens java.base/jdk.internal.module=ALL-UNNAMED
--add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand All @@ -108,6 +70,36 @@
<configuration>
<forkCount>1</forkCount>
<reuseForks>true</reuseForks>
<argLine>
${argLine}
-Djdk.attach.allowAttachSelf=true
--add-exports java.base/java.lang.ref=ALL-UNNAMED
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
--add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.server=ALL-UNNAMED
--add-exports java.sql/java.sql=ALL-UNNAMED
--add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.lang.module=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
--add-opens java.base/jdk.internal.math=ALL-UNNAMED
--add-opens java.base/jdk.internal.module=ALL-UNNAMED
--add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac=ALL-UNNAMED
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
</argLine>
</configuration>
<executions>
<execution>
Expand Down
72 changes: 32 additions & 40 deletions integration-test-standard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.ericsson.bss.cassandra.ecaudit</groupId>
<artifactId>parent_c4.1</artifactId>
<artifactId>parent_c5.0</artifactId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<artifactId>integration-test-standard_c4.1</artifactId>
<artifactId>integration-test-standard_c5.0</artifactId>

<name>Ericsson Cassandra Audit - Standard IT</name>

Expand Down Expand Up @@ -71,44 +71,6 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>jdk11</id>
<activation>
<jdk>11</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<argLine>
${argLine}
-Djdk.attach.allowAttachSelf=true
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
--add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.server=ALL-UNNAMED
--add-exports java.sql/java.sql=ALL-UNNAMED
--add-opens java.base/java.lang.module=ALL-UNNAMED
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
--add-opens java.base/jdk.internal.math=ALL-UNNAMED
--add-opens java.base/jdk.internal.module=ALL-UNNAMED
--add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand All @@ -118,6 +80,36 @@
<configuration>
<forkCount>2</forkCount>
<reuseForks>true</reuseForks>
<argLine>
${argLine}
-Djdk.attach.allowAttachSelf=true
--add-exports java.base/java.lang.ref=ALL-UNNAMED
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.base/jdk.internal.ref=ALL-UNNAMED
--add-exports java.base/sun.nio.ch=ALL-UNNAMED
--add-exports java.management.rmi/com.sun.jmx.remote.internal.rmi=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED
--add-exports java.rmi/sun.rmi.server=ALL-UNNAMED
--add-exports java.sql/java.sql=ALL-UNNAMED
--add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.lang.module=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.base/java.nio=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/jdk.internal.loader=ALL-UNNAMED
--add-opens java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED
--add-opens java.base/jdk.internal.math=ALL-UNNAMED
--add-opens java.base/jdk.internal.module=ALL-UNNAMED
--add-opens java.base/jdk.internal.util.jar=ALL-UNNAMED
--add-opens java.base/sun.nio.ch=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac=ALL-UNNAMED
--add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED
</argLine>
</configuration>
<executions>
<execution>
Expand Down
Loading
Loading