Skip to content

Commit 108bb4c

Browse files
committed
disabled VST in integration tests
1 parent e3dccb0 commit 108bb4c

File tree

7 files changed

+287
-5
lines changed

7 files changed

+287
-5
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ jobs:
220220
docker-img:
221221
- docker.io/arangodb/arangodb-preview:devel-nightly
222222
topology:
223-
- single
223+
- cluster
224224
java-version:
225225
- 21
226226
compression:
@@ -246,16 +246,16 @@ jobs:
246246
run: mvn --no-transfer-progress install -DskipTests=true -Dgpg.skip=true -Dmaven.javadoc.skip=true
247247
- name: Test internal-serde
248248
working-directory: integration-tests
249-
run: mvn --no-transfer-progress -Pinternal-serde -DenableSlowTests=true test
249+
run: mvn --no-transfer-progress -Pinternal-serde test
250250
- name: Test jackson-serde
251251
working-directory: integration-tests
252-
run: mvn --no-transfer-progress -Pjackson-serde -DenableSlowTests=true test
252+
run: mvn --no-transfer-progress -Pjackson-serde test
253253
- name: Test jsonb-serde
254254
working-directory: integration-tests
255-
run: mvn --no-transfer-progress -Pjsonb-serde -DenableSlowTests=true test
255+
run: mvn --no-transfer-progress -Pjsonb-serde test
256256
- name: Test plain
257257
working-directory: integration-tests
258-
run: mvn --no-transfer-progress -Pplain -DenableSlowTests=true test
258+
run: mvn --no-transfer-progress -Pplain test
259259

260260
sonar:
261261
if: '! github.event.pull_request.draft'

integration-tests/src/test/internal/java/arch/BaseTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ protected static ArangoDB createAdb(Protocol protocol) {
3636

3737
protected static Stream<Arguments> adbByProtocol() {
3838
return Arrays.stream(Protocol.values())
39+
.filter(p -> !p.equals(Protocol.VST) || TestUtils.isLessThanVersion(3, 12))
3940
.map(BaseTest::createAdb)
4041
.map(Arguments::of);
4142
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* DISCLAIMER
3+
*
4+
* Copyright 2016 ArangoDB GmbH, Cologne, Germany
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* Copyright holder is ArangoDB GmbH, Cologne, Germany
19+
*/
20+
21+
package arch;
22+
23+
24+
import com.arangodb.ArangoDB;
25+
import com.arangodb.config.ArangoConfigProperties;
26+
import com.arangodb.entity.ArangoDBVersion;
27+
28+
/**
29+
* @author Michele Rastelli
30+
*/
31+
public abstract class TestUtils {
32+
33+
private static final ArangoDBVersion version = new ArangoDB.Builder()
34+
.loadProperties(ArangoConfigProperties.fromFile())
35+
.build()
36+
.getVersion();
37+
38+
protected static boolean isAtLeastVersion(final int major, final int minor) {
39+
return isAtLeastVersion(major, minor, 0);
40+
}
41+
42+
protected static boolean isAtLeastVersion(final int major, final int minor, final int patch) {
43+
return isAtLeastVersion(version.getVersion(), major, minor, patch);
44+
}
45+
46+
protected static boolean isLessThanVersion(final int major, final int minor) {
47+
return isLessThanVersion(major, minor, 0);
48+
}
49+
50+
protected static boolean isLessThanVersion(final int major, final int minor, final int patch) {
51+
return isLessThanVersion(version.getVersion(), major, minor, patch);
52+
}
53+
54+
/**
55+
* Parses {@param version} and checks whether it is greater or equal to <{@param otherMajor}, {@param otherMinor},
56+
* {@param otherPatch}> comparing the corresponding version components in lexicographical order.
57+
*/
58+
private static boolean isAtLeastVersion(final String version, final int otherMajor, final int otherMinor,
59+
final int otherPatch) {
60+
return compareVersion(version, otherMajor, otherMinor, otherPatch) >= 0;
61+
}
62+
63+
/**
64+
* Parses {@param version} and checks whether it is less than <{@param otherMajor}, {@param otherMinor},
65+
* {@param otherPatch}> comparing the corresponding version components in lexicographical order.
66+
*/
67+
private static boolean isLessThanVersion(final String version, final int otherMajor, final int otherMinor,
68+
final int otherPatch) {
69+
return compareVersion(version, otherMajor, otherMinor, otherPatch) < 0;
70+
}
71+
72+
private static int compareVersion(final String version, final int otherMajor, final int otherMinor,
73+
final int otherPatch) {
74+
String[] parts = version.split("-")[0].split("\\.");
75+
76+
int major = Integer.parseInt(parts[0]);
77+
int minor = Integer.parseInt(parts[1]);
78+
int patch = Integer.parseInt(parts[2]);
79+
80+
int majorComparison = Integer.compare(major, otherMajor);
81+
if (majorComparison != 0) {
82+
return majorComparison;
83+
}
84+
85+
int minorComparison = Integer.compare(minor, otherMinor);
86+
if (minorComparison != 0) {
87+
return minorComparison;
88+
}
89+
90+
return Integer.compare(patch, otherPatch);
91+
}
92+
93+
}

integration-tests/src/test/jackson/java/arch/BaseTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ protected static ArangoDB createAdb(Protocol protocol) {
3636

3737
protected static Stream<Arguments> adbByProtocol() {
3838
return Arrays.stream(Protocol.values())
39+
.filter(p -> !p.equals(Protocol.VST) || TestUtils.isLessThanVersion(3, 12))
3940
.map(BaseTest::createAdb)
4041
.map(Arguments::of);
4142
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* DISCLAIMER
3+
*
4+
* Copyright 2016 ArangoDB GmbH, Cologne, Germany
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* Copyright holder is ArangoDB GmbH, Cologne, Germany
19+
*/
20+
21+
package arch;
22+
23+
24+
import com.arangodb.ArangoDB;
25+
import com.arangodb.config.ArangoConfigProperties;
26+
import com.arangodb.entity.ArangoDBVersion;
27+
28+
/**
29+
* @author Michele Rastelli
30+
*/
31+
public abstract class TestUtils {
32+
33+
private static final ArangoDBVersion version = new ArangoDB.Builder()
34+
.loadProperties(ArangoConfigProperties.fromFile())
35+
.build()
36+
.getVersion();
37+
38+
protected static boolean isAtLeastVersion(final int major, final int minor) {
39+
return isAtLeastVersion(major, minor, 0);
40+
}
41+
42+
protected static boolean isAtLeastVersion(final int major, final int minor, final int patch) {
43+
return isAtLeastVersion(version.getVersion(), major, minor, patch);
44+
}
45+
46+
protected static boolean isLessThanVersion(final int major, final int minor) {
47+
return isLessThanVersion(major, minor, 0);
48+
}
49+
50+
protected static boolean isLessThanVersion(final int major, final int minor, final int patch) {
51+
return isLessThanVersion(version.getVersion(), major, minor, patch);
52+
}
53+
54+
/**
55+
* Parses {@param version} and checks whether it is greater or equal to <{@param otherMajor}, {@param otherMinor},
56+
* {@param otherPatch}> comparing the corresponding version components in lexicographical order.
57+
*/
58+
private static boolean isAtLeastVersion(final String version, final int otherMajor, final int otherMinor,
59+
final int otherPatch) {
60+
return compareVersion(version, otherMajor, otherMinor, otherPatch) >= 0;
61+
}
62+
63+
/**
64+
* Parses {@param version} and checks whether it is less than <{@param otherMajor}, {@param otherMinor},
65+
* {@param otherPatch}> comparing the corresponding version components in lexicographical order.
66+
*/
67+
private static boolean isLessThanVersion(final String version, final int otherMajor, final int otherMinor,
68+
final int otherPatch) {
69+
return compareVersion(version, otherMajor, otherMinor, otherPatch) < 0;
70+
}
71+
72+
private static int compareVersion(final String version, final int otherMajor, final int otherMinor,
73+
final int otherPatch) {
74+
String[] parts = version.split("-")[0].split("\\.");
75+
76+
int major = Integer.parseInt(parts[0]);
77+
int minor = Integer.parseInt(parts[1]);
78+
int patch = Integer.parseInt(parts[2]);
79+
80+
int majorComparison = Integer.compare(major, otherMajor);
81+
if (majorComparison != 0) {
82+
return majorComparison;
83+
}
84+
85+
int minorComparison = Integer.compare(minor, otherMinor);
86+
if (minorComparison != 0) {
87+
return minorComparison;
88+
}
89+
90+
return Integer.compare(patch, otherPatch);
91+
}
92+
93+
}

integration-tests/src/test/jsonb/java/arch/BaseTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ protected static ArangoDB createAdb(Protocol protocol) {
4949

5050
protected static Stream<Arguments> adbByProtocol() {
5151
return Arrays.stream(Protocol.values())
52+
.filter(p -> !p.equals(Protocol.VST) || TestUtils.isLessThanVersion(3, 12))
5253
.filter(BaseTest::isProtocolSupported)
5354
.map(BaseTest::createAdb)
5455
.map(Arguments::of);
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* DISCLAIMER
3+
*
4+
* Copyright 2016 ArangoDB GmbH, Cologne, Germany
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*
18+
* Copyright holder is ArangoDB GmbH, Cologne, Germany
19+
*/
20+
21+
package arch;
22+
23+
24+
import com.arangodb.ArangoDB;
25+
import com.arangodb.config.ArangoConfigProperties;
26+
import com.arangodb.entity.ArangoDBVersion;
27+
28+
/**
29+
* @author Michele Rastelli
30+
*/
31+
public abstract class TestUtils {
32+
33+
private static final ArangoDBVersion version = new ArangoDB.Builder()
34+
.loadProperties(ArangoConfigProperties.fromFile())
35+
.build()
36+
.getVersion();
37+
38+
protected static boolean isAtLeastVersion(final int major, final int minor) {
39+
return isAtLeastVersion(major, minor, 0);
40+
}
41+
42+
protected static boolean isAtLeastVersion(final int major, final int minor, final int patch) {
43+
return isAtLeastVersion(version.getVersion(), major, minor, patch);
44+
}
45+
46+
protected static boolean isLessThanVersion(final int major, final int minor) {
47+
return isLessThanVersion(major, minor, 0);
48+
}
49+
50+
protected static boolean isLessThanVersion(final int major, final int minor, final int patch) {
51+
return isLessThanVersion(version.getVersion(), major, minor, patch);
52+
}
53+
54+
/**
55+
* Parses {@param version} and checks whether it is greater or equal to <{@param otherMajor}, {@param otherMinor},
56+
* {@param otherPatch}> comparing the corresponding version components in lexicographical order.
57+
*/
58+
private static boolean isAtLeastVersion(final String version, final int otherMajor, final int otherMinor,
59+
final int otherPatch) {
60+
return compareVersion(version, otherMajor, otherMinor, otherPatch) >= 0;
61+
}
62+
63+
/**
64+
* Parses {@param version} and checks whether it is less than <{@param otherMajor}, {@param otherMinor},
65+
* {@param otherPatch}> comparing the corresponding version components in lexicographical order.
66+
*/
67+
private static boolean isLessThanVersion(final String version, final int otherMajor, final int otherMinor,
68+
final int otherPatch) {
69+
return compareVersion(version, otherMajor, otherMinor, otherPatch) < 0;
70+
}
71+
72+
private static int compareVersion(final String version, final int otherMajor, final int otherMinor,
73+
final int otherPatch) {
74+
String[] parts = version.split("-")[0].split("\\.");
75+
76+
int major = Integer.parseInt(parts[0]);
77+
int minor = Integer.parseInt(parts[1]);
78+
int patch = Integer.parseInt(parts[2]);
79+
80+
int majorComparison = Integer.compare(major, otherMajor);
81+
if (majorComparison != 0) {
82+
return majorComparison;
83+
}
84+
85+
int minorComparison = Integer.compare(minor, otherMinor);
86+
if (minorComparison != 0) {
87+
return minorComparison;
88+
}
89+
90+
return Integer.compare(patch, otherPatch);
91+
}
92+
93+
}

0 commit comments

Comments
 (0)