Skip to content

Commit 818eaf5

Browse files
committed
CI: resilience-test
1 parent e9f0297 commit 818eaf5

File tree

5 files changed

+42
-81
lines changed

5 files changed

+42
-81
lines changed

.circleci/config.yml

+36-15
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ commands:
2727
topology:
2828
type: 'string'
2929
default: 'single'
30-
starter-docker-img:
31-
type: 'string'
32-
default: 'docker.io/arangodb/arangodb-starter:latest'
3330
ssl:
3431
type: 'string'
3532
default: 'false'
@@ -43,7 +40,7 @@ commands:
4340
environment:
4441
DOCKER_IMAGE: <<parameters.docker-img>>
4542
STARTER_MODE: <<parameters.topology>>
46-
STARTER_DOCKER_IMAGE: <<parameters.starter-docker-img>>
43+
STARTER_DOCKER_IMAGE: 'docker.io/arangodb/arangodb-starter:0.18.5'
4744
SSL: <<parameters.ssl>>
4845
COMPRESSION: <<parameters.compression>>
4946
mvn-info:
@@ -127,9 +124,6 @@ jobs:
127124
topology:
128125
type: 'string'
129126
default: 'single'
130-
starter-docker-img:
131-
type: 'string'
132-
default: 'docker.io/arangodb/arangodb-starter:latest'
133127
ssl:
134128
type: 'string'
135129
default: 'false'
@@ -178,8 +172,7 @@ jobs:
178172
default: ''
179173
executor: 'j21'
180174
steps:
181-
- timeout:
182-
duration: '5m'
175+
- timeout
183176
- checkout
184177
- setup_remote_docker
185178
- start-db
@@ -250,6 +243,32 @@ jobs:
250243
working_directory: tutorial/gradle
251244
- store_cache
252245

246+
resilience-test:
247+
executor: 'j21'
248+
steps:
249+
- timeout:
250+
duration: '10m'
251+
- checkout
252+
- setup_remote_docker
253+
- start-db:
254+
topology: 'cluster'
255+
compression: 'true'
256+
- load_cache
257+
- mvn-info
258+
- run:
259+
name: Start Toxiproxy
260+
command: ./bin/startProxy.sh
261+
working_directory: resilience-tests
262+
background: true
263+
environment:
264+
TOXIPROXY_VERSION: v2.9.0
265+
- mvn-install
266+
- run:
267+
name: Test
268+
command: mvn test
269+
working_directory: resilience-tests
270+
- store_cache
271+
253272
deploy:
254273
executor: 'j11'
255274
steps:
@@ -317,8 +336,6 @@ workflows:
317336
# - 'docker.io/arangodb/enterprise:3.11'
318337
# topology:
319338
# - 'activefailover'
320-
# starter-docker-img:
321-
# - 'docker.io/arangodb/arangodb-starter:0.18.5'
322339
# filters:
323340
# tags:
324341
# only: /^v.*/
@@ -402,10 +419,14 @@ workflows:
402419
# - 'docker.io/arangodb/enterprise:3.11'
403420
# topology:
404421
# - 'cluster'
405-
406-
tutorial:
407-
jobs:
408-
- tutorial
422+
#
423+
# tutorial:
424+
# jobs:
425+
# - tutorial
426+
#
427+
# resilience-test:
428+
# jobs:
429+
# - resilience-test
409430

410431
deploy:
411432
jobs:

.github/workflows/resilience.yml

-61
This file was deleted.

resilience-tests/bin/startProxy.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
wget -O bin/toxiproxy-server-linux-amd64 https://github.com/Shopify/toxiproxy/releases/download/${TOXIPROXY_VERSION}/toxiproxy-server-linux-amd64
44
chmod a+x bin/toxiproxy-server-linux-amd64
5-
bin/toxiproxy-server-linux-amd64 &
5+
./bin/toxiproxy-server-linux-amd64

resilience-tests/src/test/java/resilience/connection/AcquireHostListTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class AcquireHostListTest extends ClusterTest {
2121
@MethodSource("protocolProvider")
2222
void acquireHostList(Protocol protocol) {
2323
ArangoDB adb = new ArangoDB.Builder()
24-
.host("127.0.0.1", 8529)
24+
.host("172.28.0.1", 8529)
2525
.password("test")
2626
.acquireHostList(true)
2727
.protocol(protocol)
@@ -44,7 +44,7 @@ void acquireHostList(Protocol protocol) {
4444
@EnumSource(LoadBalancingStrategy.class)
4545
void acquireHostListWithLoadBalancingStrategy(LoadBalancingStrategy lb) {
4646
ArangoDB adb = new ArangoDB.Builder()
47-
.host("127.0.0.1", 8529)
47+
.host("172.28.0.1", 8529)
4848
.password("test")
4949
.acquireHostList(true)
5050
.loadBalancingStrategy(lb)

resilience-tests/src/test/java/resilience/protocol/ProtocolTest.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static Stream<Arguments> args() {
4848
void shouldUseConfiguredProtocol(Protocol p, String expectedLog) {
4949
assumeTrue(!p.equals(Protocol.VST) || isLessThanVersion(3, 12));
5050
ArangoDB adb = new ArangoDB.Builder()
51-
.host("localhost", 8529)
51+
.host("172.28.0.1", 8529)
5252
.password("test")
5353
.protocol(p)
5454
.build();
@@ -64,11 +64,12 @@ void shouldUseConfiguredProtocol(Protocol p, String expectedLog) {
6464
void shouldUseConfiguredProtocolWithTLS(Protocol p, String expectedLog) throws Exception {
6565
assumeTrue(!p.equals(Protocol.VST) || isLessThanVersion(3, 12));
6666
ArangoDB adb = new ArangoDB.Builder()
67-
.host("localhost", 8529)
67+
.host("172.28.0.1", 8529)
6868
.password("test")
6969
.protocol(p)
7070
.useSsl(true)
7171
.sslContext(sslContext())
72+
.verifyHost(false)
7273
.build();
7374
adb.getVersion();
7475
assertThat(logs.getLogs()).anyMatch(it -> it.getLoggerName().contains(expectedLog));

0 commit comments

Comments
 (0)