Skip to content

Commit

Permalink
[DE-847] fix shaded tests (#568)
Browse files Browse the repository at this point in the history
* cleaned generated maven metadata of shaded driver

* CI: fíx shaded tests
  • Loading branch information
rashtao authored Sep 4, 2024
1 parent 202192f commit 30eaf7e
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 33 deletions.
198 changes: 165 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ commands:
STARTER_DOCKER_IMAGE: 'docker.io/arangodb/arangodb-starter:0.18.5'
SSL: <<parameters.ssl>>
COMPRESSION: <<parameters.compression>>
install:
steps:
- run:
name: mvn install
command: mvn install -Dmaven.test.skip -Dgpg.skip -Dmaven.javadoc.skip
report:
parameters:
working_directory:
Expand Down Expand Up @@ -139,9 +144,6 @@ jobs:
args:
type: 'string'
default: ''
shaded:
type: 'string'
default: 'false'
ssl:
type: 'string'
default: 'false'
Expand Down Expand Up @@ -176,27 +178,91 @@ jobs:
name: mvn dependency:tree
command: |
mvn dependency:tree -am -pl test-functional \
-Dshaded=<<parameters.shaded>> \
-Dssl=<<parameters.ssl>> \
-Dnative=<<parameters.native>> \
<<parameters.args>>
- run:
name: Test
command: |
mvn verify -am -pl test-functional -Dgpg.skip -Dmaven.javadoc.skip \
-Dshaded=<<parameters.shaded>> \
-Dssl=<<parameters.ssl>> \
-Dnative=<<parameters.native>> \
<<parameters.args>>
- report:
working_directory: test-functional
- store_cache

test-non-func:
# DE-847
# https://issues.apache.org/jira/browse/MSHADE-206
# https://issues.apache.org/jira/browse/MNG-5899
test-shaded:
parameters:
shaded:
docker-img:
type: 'string'
default: <<pipeline.parameters.docker-img>>
topology:
type: 'string'
default: 'single'
jdk:
type: 'string'
default: 'j21'
args:
type: 'string'
default: ''
ssl:
type: 'string'
default: 'false'
native:
type: 'string'
default: 'false'
graalvm-version:
type: 'string'
default: '21.0.2-graalce'
resource_class:
type: 'string'
default: 'medium'
executor: <<parameters.jdk>>
resource_class: <<parameters.resource_class>>
steps:
- timeout
- checkout
- setup_remote_docker
- when:
condition:
equal: [ 'true', <<parameters.native>> ]
steps:
- install-sdk:
sdk: 'java'
version: <<parameters.graalvm-version>>
- start-db:
docker-img: <<parameters.docker-img>>
topology: <<parameters.topology>>
ssl: <<parameters.ssl>>
- load_cache
- install
- run:
name: mvn dependency:tree
working_directory: test-functional
command: |
mvn dependency:tree \
-Dshaded \
-Dssl=<<parameters.ssl>> \
-Dnative=<<parameters.native>> \
<<parameters.args>>
- run:
name: Test
working_directory: test-functional
command: |
mvn verify -Dgpg.skip \
-Dshaded \
-Dssl=<<parameters.ssl>> \
-Dnative=<<parameters.native>> \
<<parameters.args>>
- report:
working_directory: test-functional
- store_cache

test-non-func:
executor: 'j21'
steps:
- timeout
Expand All @@ -209,12 +275,35 @@ jobs:
- load_cache
- run:
name: mvn dependency:tree
command: mvn dependency:tree -am -pl test-non-functional -Dshaded=<<parameters.shaded>>
command: mvn dependency:tree -am -pl test-non-functional
- run:
name: Test
command: mvn verify -am -pl test-non-functional -Dgpg.skip -Dmaven.javadoc.skip -Dshaded=<<parameters.shaded>>
- report:
working_directory: test-functional
command: mvn verify -am -pl test-non-functional -Dgpg.skip -Dmaven.javadoc.skip
- store_cache

# DE-847
# https://issues.apache.org/jira/browse/MSHADE-206
# https://issues.apache.org/jira/browse/MNG-5899
test-non-func-shaded:
executor: 'j21'
steps:
- timeout
- checkout
- setup_remote_docker
- install-sdk:
sdk: 'java'
version: '21.0.2-graalce'
- start-db
- load_cache
- install
- run:
name: mvn dependency:tree
working_directory: test-non-functional
command: mvn dependency:tree -Dshaded
- run:
name: Test
working_directory: test-non-functional
command: mvn verify -Dgpg.skip -Dmaven.javadoc.skip -Dshaded
- store_cache

sonar:
Expand Down Expand Up @@ -266,10 +355,6 @@ jobs:
resilience-test:
executor: 'j21'
resource_class: 'large'
parameters:
shaded:
type: 'string'
default: 'false'
steps:
- timeout
- checkout
Expand All @@ -287,10 +372,42 @@ jobs:
TOXIPROXY_VERSION: v2.9.0
- run:
name: mvn dependency:tree
command: mvn dependency:tree -am -pl test-resilience -Dshaded=<<parameters.shaded>>
command: mvn dependency:tree -am -pl test-resilience
- run:
name: Test
command: mvn verify -am -pl test-resilience -Dgpg.skip -Dmaven.javadoc.skip -Dshaded=<<parameters.shaded>>
command: mvn verify -am -pl test-resilience -Dgpg.skip -Dmaven.javadoc.skip
- store_cache

# DE-847
# https://issues.apache.org/jira/browse/MSHADE-206
# https://issues.apache.org/jira/browse/MNG-5899
resilience-test-shaded:
executor: 'j21'
resource_class: 'large'
steps:
- timeout
- checkout
- setup_remote_docker
- start-db:
topology: 'cluster'
compression: 'true'
- load_cache
- install
- run:
name: Start Toxiproxy
command: ./bin/startProxy.sh
working_directory: test-resilience
background: true
environment:
TOXIPROXY_VERSION: v2.9.0
- run:
name: mvn dependency:tree
working_directory: test-resilience
command: mvn dependency:tree -Dshaded
- run:
name: Test
working_directory: test-resilience
command: mvn verify -Dgpg.skip -Dmaven.javadoc.skip -Dshaded
- store_cache

deploy:
Expand Down Expand Up @@ -366,12 +483,16 @@ workflows:
not: <<pipeline.parameters.docker-img>>
jobs:
- test:
name: test-shaded=<<matrix.shaded>>-ssl=<<matrix.ssl>>
name: test-ssl=<<matrix.ssl>>
matrix:
parameters:
shaded:
ssl:
- 'true'
- 'false'
- test-shaded:
name: test-shaded-ssl=<<matrix.ssl>>
matrix:
parameters:
ssl:
- 'true'
- 'false'
Expand Down Expand Up @@ -409,16 +530,33 @@ workflows:
only:
- main
- test:
name: test-native-shaded=<<matrix.shaded>>-ssl=<<matrix.ssl>>
name: test-native-ssl=<<matrix.ssl>>
matrix:
parameters:
native:
- 'true'
resource_class:
- '2xlarge'
shaded:
ssl:
- 'true'
- 'false'
graalvm-version:
- '22.0.1-graalce'
- '21.0.2-graalce'
filters:
tags:
only: /^v.*/
branches:
only:
- main
- test-shaded:
name: test-native-shaded-ssl=<<matrix.ssl>>
matrix:
parameters:
native:
- 'true'
resource_class:
- '2xlarge'
ssl:
- 'true'
- 'false'
Expand Down Expand Up @@ -450,12 +588,9 @@ workflows:
test-non-func:
jobs:
- test-non-func:
name: test-non-func-shaded=<<matrix.shaded>>
matrix:
parameters:
shaded:
- 'true'
- 'false'
name: test-non-func
- test-non-func-shaded:
name: test-non-func-shaded

sonar:
when:
Expand All @@ -473,12 +608,9 @@ workflows:
resilience-test:
jobs:
- resilience-test:
name: resilience-test-shaded=<<matrix.shaded>>
matrix:
parameters:
shaded:
- 'true'
- 'false'
name: resilience-test
- resilience-test-shaded:
name: resilience-test-shaded

deploy:
jobs:
Expand Down
5 changes: 5 additions & 0 deletions shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<useDependencyReducedPomInJar>true</useDependencyReducedPomInJar>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<createSourcesJar>true</createSourcesJar>
<shadeSourcesContent>true</shadeSourcesContent>
<artifactSet>
Expand Down Expand Up @@ -111,13 +114,15 @@
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/services/**</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
<filter>
<artifact>com.arangodb:http-protocol</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/services/**</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
<filter>
Expand Down

0 comments on commit 30eaf7e

Please sign in to comment.