Skip to content
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
13 changes: 8 additions & 5 deletions .github/workflows/native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ jobs:
- docker.io/arangodb/enterprise:3.10.1
topology:
- cluster
db-ext-names:
- false
java-version:
- 17
module:
- driver
- shaded

steps:
- uses: actions/checkout@v2
Expand All @@ -36,13 +37,12 @@ jobs:
ARANGO_LICENSE_KEY: ${{ secrets.ARANGO_LICENSE_KEY }}
STARTER_MODE: ${{matrix.topology}}
DOCKER_IMAGE: ${{matrix.docker-img}}
DATABASE_EXTENDED_NAMES: ${{matrix.db-ext-names}}
- name: Info
run: mvn -version
- name: Install
run: mvn --no-transfer-progress install -DskipTests=true -Dgpg.skip=true -Dmaven.javadoc.skip=true
- name: Test Native
working-directory: driver
working-directory: ${{matrix.module}}
run: mvn -Pnative --no-transfer-progress test

test-native-ssl:
Expand All @@ -58,6 +58,9 @@ jobs:
- single
java-version:
- 17
module:
- driver
- shaded

steps:
- uses: actions/checkout@v2
Expand All @@ -79,5 +82,5 @@ jobs:
- name: Install
run: mvn --no-transfer-progress install -DskipTests=true -Dgpg.skip=true -Dmaven.javadoc.skip=true
- name: Test Native
working-directory: driver
working-directory: ${{matrix.module}}
run: mvn -Pnative --no-transfer-progress -Dgroups=ssl -DSslTest=true test
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ Args=\
-H:SerializationConfigurationResources=${.}/serialization-config.json \
--initialize-at-run-time=\
io.netty.handler.ssl.BouncyCastleAlpnSslUtils,\
io.netty.handler.codec.compression.ZstdOptions
io.netty.handler.codec.compression.ZstdOptions \
-Dio.netty.noUnsafe=true \
-Dio.netty.leakDetection.level=DISABLED
31 changes: 0 additions & 31 deletions driver/src/test/java/com/arangodb/serde/SerdeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
import com.arangodb.internal.serde.SerdeUtils;
import com.arangodb.util.RawBytes;
import com.arangodb.util.RawJson;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;

import java.sql.Date;

import static org.assertj.core.api.Assertions.assertThat;


Expand Down Expand Up @@ -40,32 +37,4 @@ void rawBytesSerde(ContentType type) {
assertThat(deserialized).isEqualTo(raw);
}

@ParameterizedTest
@EnumSource(ContentType.class)
void utilDateSerde(ContentType type) {
InternalSerde s = InternalSerde.of(type, null);
long ts = 1000000000000L;
java.util.Date date = new java.util.Date(ts);
byte[] ser = s.serialize(date);
JsonNode node = s.parse(ser);
assertThat(node.isLong()).isTrue();
assertThat(node.longValue()).isEqualTo(ts);
java.util.Date deser = s.deserialize(ser, java.util.Date.class);
assertThat(deser).isEqualTo(date);
}

@ParameterizedTest
@EnumSource(ContentType.class)
void sqlDateSerde(ContentType type) {
InternalSerde s = InternalSerde.of(type, null);
long ts = 1000000000000L;
java.sql.Date date = new Date(ts);
byte[] ser = s.serialize(date);
JsonNode node = s.parse(ser);
assertThat(node.isLong()).isTrue();
assertThat(node.longValue()).isEqualTo(ts);
java.sql.Date deser = s.deserialize(ser, java.sql.Date.class);
assertThat(deser).isEqualTo(date);
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Args=\
-H:ResourceConfigurationFiles=target/test-classes/META-INF/native-image/resource-config.json \
-H:ResourceConfigurationResources=${.}/resource-config.json \
-H:ReflectionConfigurationResources=${.}/reflect-config.json \
-H:SerializationConfigurationResources=${.}/serialization-config.json \
--initialize-at-build-time=\
Expand Down
36 changes: 30 additions & 6 deletions shaded-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@
<version>3.23.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
Expand Down Expand Up @@ -128,6 +122,12 @@
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
Expand Down Expand Up @@ -160,10 +160,34 @@
<artifactId>yasson</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>native</id>
<properties>
<testSourceDirectory>src/test/native/java</testSourceDirectory>
<serde>jackson</serde>
</properties>
<dependencies>
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>arangodb-java-driver-shaded</artifactId>
<version>7.0.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>jackson-dataformat-velocypack</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
import com.arangodb.ContentType;
import com.arangodb.internal.serde.InternalSerde;
import com.arangodb.internal.serde.SerdeUtils;
import com.arangodb.shaded.fasterxml.jackson.databind.JsonNode;
import com.arangodb.shaded.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.arangodb.shaded.fasterxml.jackson.databind.node.ObjectNode;
import com.arangodb.util.RawBytes;
import com.arangodb.util.RawJson;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;

import java.sql.Date;

import static org.assertj.core.api.Assertions.assertThat;


Expand Down Expand Up @@ -40,32 +37,4 @@ void rawBytesSerde(ContentType type) {
assertThat(deserialized).isEqualTo(raw);
}

@ParameterizedTest
@EnumSource(ContentType.class)
void utilDateSerde(ContentType type) {
InternalSerde s = InternalSerde.of(type, null);
long ts = 1000000000000L;
java.util.Date date = new java.util.Date(ts);
byte[] ser = s.serialize(date);
JsonNode node = s.parse(ser);
assertThat(node.isLong()).isTrue();
assertThat(node.longValue()).isEqualTo(ts);
java.util.Date deser = s.deserialize(ser, java.util.Date.class);
assertThat(deser).isEqualTo(date);
}

@ParameterizedTest
@EnumSource(ContentType.class)
void sqlDateSerde(ContentType type) {
InternalSerde s = InternalSerde.of(type, null);
long ts = 1000000000000L;
Date date = new Date(ts);
byte[] ser = s.serialize(date);
JsonNode node = s.parse(ser);
assertThat(node.isLong()).isTrue();
assertThat(node.longValue()).isEqualTo(ts);
Date deser = s.deserialize(ser, Date.class);
assertThat(deser).isEqualTo(date);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Args=\
-H:ResourceConfigurationResources=${.}/resource-config.json \
-H:ReflectionConfigurationResources=${.}/reflect-config.json \
-H:SerializationConfigurationResources=${.}/serialization-config.json \
--initialize-at-build-time=\
ch.qos.logback,\
org.slf4j,\
org.junit.platform.engine.TestTag
Loading