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
2 changes: 1 addition & 1 deletion .github/workflows/maven-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '11'
distribution: 'adopt'
cache: 'maven'
server-id: ossrh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '11'
distribution: 'adopt'
cache: 'maven'
server-id: ossrh
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
docker-img:
- docker.io/arangodb/enterprise:3.10.1
topology:
- cluster
- single
java-version:
- 17
module:
- driver
- shaded-integration-tests
- integration-tests

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
- 17
module:
- driver
- shaded-integration-tests
- integration-tests

steps:
- uses: actions/checkout@v2
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
db-ext-names:
- false
java-version:
- 8
- 11
user-language:
- en
include:
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
- name: Test
run: mvn --no-transfer-progress -am -pl driver test -Dadb.jackson.version=${{matrix.jackson-version}}

shaded-integration-tests:
integration-tests:
timeout-minutes: 20
runs-on: ubuntu-latest

Expand Down Expand Up @@ -255,14 +255,17 @@ jobs:
- name: Install
run: mvn --no-transfer-progress install -DskipTests=true -Dgpg.skip=true -Dmaven.javadoc.skip=true
- name: Test internal-serde
working-directory: shaded-integration-tests
working-directory: integration-tests
run: mvn --no-transfer-progress -Pinternal-serde test
- name: Test jackson-serde
working-directory: shaded-integration-tests
working-directory: integration-tests
run: mvn --no-transfer-progress -Pjackson-serde test
- name: Test jsonb-serde
working-directory: shaded-integration-tests
working-directory: integration-tests
run: mvn --no-transfer-progress -Pjsonb-serde test
- name: Test plain
working-directory: integration-tests
run: mvn --no-transfer-progress -Pplain test

sonar:
timeout-minutes: 10
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/com/arangodb/async/ArangoDBAsync.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ private AsyncProtocolProvider asyncProtocolProvider(Protocol protocol) {
if (p.supportsProtocol(protocol)) {
return p;
}
LOG.debug("Required protocol ({}) not supported by ProtocolProvider: {}", protocol, p.getClass().getName());
}
throw new ArangoDBException("No ProtocolProvider found for protocol: " + protocol);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* @author Mark Vollmary
*/
public abstract class InternalArangoDBBuilder<T extends InternalArangoDBBuilder<T>> {
private static final Logger LOG = LoggerFactory.getLogger(InternalArangoDBBuilder.class);
protected static final Logger LOG = LoggerFactory.getLogger(InternalArangoDBBuilder.class);
protected final ArangoConfig config = new ArangoConfig();

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -295,6 +295,7 @@ protected ProtocolProvider protocolProvider(Protocol protocol) {
if (p.supportsProtocol(protocol)) {
return p;
}
LOG.debug("Required protocol ({}) not supported by ProtocolProvider: {}", protocol, p.getClass().getName());
}
throw new ArangoDBException("No ProtocolProvider found for protocol: " + protocol);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
import com.arangodb.ContentType;
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ServiceLoader;
import java.util.function.Supplier;

public interface InternalMapperProvider extends Supplier<ObjectMapper> {
Logger LOG = LoggerFactory.getLogger(InternalMapperProvider.class);

static ObjectMapper of(final ContentType contentType) {
String formatName;
if (contentType == ContentType.JSON) {
Expand All @@ -24,6 +28,7 @@ static ObjectMapper of(final ContentType contentType) {
if(formatName.equals(jf.getFormatName())){
return new ObjectMapper(jf);
}
LOG.debug("Required format ({}) not supported by JsonFactory: {}", formatName, jf.getClass().getName());
}

throw new ArangoDBException("No JsonFactory found for content type: " + contentType);
Expand Down
6 changes: 3 additions & 3 deletions driver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>jackson-serde-vpack</artifactId>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.arangodb</groupId>
<artifactId>vst-protocol</artifactId>
<scope>test</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.reflections</groupId>
Expand All @@ -154,7 +154,7 @@
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<version>22.3.0</version>
<version>22.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
Args=\
-H:ResourceConfigurationResources=${.}/resource-config.json \
-H:ReflectionConfigurationResources=${.}/reflect-config.json \
-H:ResourceConfigurationResources=${.}/resource-config.json,${.}/resource-config-spi.json \
-H:ReflectionConfigurationResources=${.}/reflect-config.json,${.}/reflect-config-spi.json,${.}/reflect-config-mp-config.json \
-H:SerializationConfigurationResources=${.}/serialization-config.json \
--initialize-at-build-time=\
org.slf4j \
--initialize-at-run-time=\
io.netty.handler.ssl.BouncyCastleAlpnSslUtils,\
io.netty.handler.codec.compression.ZstdOptions \
io.netty.handler.ssl.BouncyCastleAlpnSslUtils,\
io.netty.handler.codec.compression.ZstdOptions,\
io.netty.handler.codec.compression.BrotliOptions,\
io.netty.handler.codec.compression.Brotli \
-Dio.netty.noUnsafe=true \
-Dio.netty.leakDetection.level=DISABLED
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"name": "com.arangodb.config.HostDescription",
"methods": [
{
"name": "parse",
"parameterTypes": [
"java.lang.CharSequence"
]
}
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[
{
"name": "com.fasterxml.jackson.core.JsonFactory",
"methods": [
{
"name": "<init>",
"parameterTypes": []
}
]
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"resources": {
"includes": [
{
"pattern": "META-INF/services/com.fasterxml.jackson.core.JsonFactory"
}
]
},
"bundles": []
}
3 changes: 2 additions & 1 deletion driver/src/test/java/com/arangodb/example/FirstProject.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.arangodb.example;

import com.arangodb.*;
import com.arangodb.config.ArangoConfigProperties;
import com.arangodb.entity.BaseDocument;
import com.arangodb.entity.CollectionEntity;
import com.fasterxml.jackson.databind.JsonNode;
Expand All @@ -12,7 +13,7 @@
public class FirstProject {

public static void main(final String[] args) {
final ArangoDB arangoDB = new ArangoDB.Builder().user("root").build();
final ArangoDB arangoDB = new ArangoDB.Builder().loadProperties(ArangoConfigProperties.fromFile()).user("root").build();

// create database
final DbName dbName = DbName.of("mydb");
Expand Down
33 changes: 33 additions & 0 deletions driver/src/test/java/graal/EmptyByteBufStub.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package graal;

import io.netty.util.internal.PlatformDependent;

import java.nio.ByteBuffer;

public final class EmptyByteBufStub {
private static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBuffer.allocateDirect(0);
private static final long EMPTY_BYTE_BUFFER_ADDRESS;

static {
long emptyByteBufferAddress = 0;
try {
if (PlatformDependent.hasUnsafe()) {
emptyByteBufferAddress = PlatformDependent.directBufferAddress(EMPTY_BYTE_BUFFER);
}
} catch (Throwable t) {
// Ignore
}
EMPTY_BYTE_BUFFER_ADDRESS = emptyByteBufferAddress;
}

public static ByteBuffer emptyByteBuffer() {
return EMPTY_BYTE_BUFFER;
}

public static long emptyByteBufferAddress() {
return EMPTY_BYTE_BUFFER_ADDRESS;
}

private EmptyByteBufStub() {
}
}
29 changes: 29 additions & 0 deletions driver/src/test/java/graal/HttpContentCompressorSubstitutions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package graal;

import com.oracle.svm.core.annotate.Substitute;
import com.oracle.svm.core.annotate.TargetClass;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;

public class HttpContentCompressorSubstitutions {

@TargetClass(className = "io.netty.handler.codec.compression.ZstdEncoder")
public static final class ZstdEncoderFactorySubstitution {

@Substitute
protected ByteBuf allocateBuffer(ChannelHandlerContext ctx, ByteBuf msg, boolean preferDirect) throws Exception {
throw new UnsupportedOperationException();
}

@Substitute
protected void encode(ChannelHandlerContext ctx, ByteBuf in, ByteBuf out) {
throw new UnsupportedOperationException();
}

@Substitute
public void flush(final ChannelHandlerContext ctx) {
throw new UnsupportedOperationException();
}
}

}
Loading