Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
25a5c49
Use GCR in tests
ajanikow Jun 7, 2021
42a41e9
Fix sleep
ajanikow Jun 8, 2021
63077d8
Add more logs
ajanikow Jun 8, 2021
d49712a
Add more logs
ajanikow Jun 8, 2021
240bd0b
Reduce tests
ajanikow Jun 9, 2021
135ed6e
change process termination
ajanikow Jun 9, 2021
cb020fb
Add failfast option
ajanikow Jun 9, 2021
33c722b
Add logger to docker removal
ajanikow Jun 9, 2021
519e96d
Add logger to docker removal
ajanikow Jun 9, 2021
3a4dec2
Add logger to docker removal
ajanikow Jun 9, 2021
db271d4
Add logger to docker removal
ajanikow Jun 9, 2021
74b2e54
Add logger to docker removal
ajanikow Jun 9, 2021
331589f
Install only Docker CLI
ajanikow Jun 9, 2021
88cb752
Skip docker install
ajanikow Jun 9, 2021
f265894
Wait for docker command to exit
ajanikow Jun 9, 2021
5075a72
Wait for docker command to exit
ajanikow Jun 9, 2021
1529305
Wait for docker command to exit
ajanikow Jun 10, 2021
d0053a2
Wait for docker command to exit
ajanikow Jun 10, 2021
b3a4f65
Wait for docker command to exit
ajanikow Jun 10, 2021
b1dca3c
Wait for docker command to exit
ajanikow Jun 10, 2021
4fc98ab
Wait for docker command to exit
ajanikow Jun 10, 2021
1c585c9
Wait for docker command to exit
ajanikow Jun 10, 2021
27c9f50
Wait for docker command to exit
ajanikow Jun 10, 2021
59bb62f
Wait for docker command to exit
ajanikow Jun 10, 2021
7dd73e5
Wait for docker command to exit
ajanikow Jun 10, 2021
a998297
Wait for docker command to exit
ajanikow Jun 10, 2021
02d7216
Wait for docker command to exit
ajanikow Jun 11, 2021
9652c8b
Wait for docker command to exit
ajanikow Jun 11, 2021
5e6177a
Retry on 503
ajanikow Jun 14, 2021
fae6086
Retry on 503
ajanikow Jun 14, 2021
d6bec24
Aww waiters
ajanikow Jun 15, 2021
b693437
Aww waiters
ajanikow Jun 15, 2021
0b50ea0
Add waiters
ajanikow Jun 15, 2021
727222f
Add waiters
ajanikow Jun 15, 2021
03161a2
Add waiters
ajanikow Jun 15, 2021
13fa62d
Add waiters
ajanikow Jun 15, 2021
f248c1b
Add waiters
ajanikow Jun 15, 2021
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
28 changes: 15 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ go:
- "1.13.x"

env:
- VERBOSE=1 TEST_SUITE=run-tests-local-process ARANGODB=arangodb:3.6 STARTER_MODES="single,cluster,activefailover"
- VERBOSE=1 TEST_SUITE=run-tests-docker ARANGODB=arangodb:3.6 STARTER_MODES="single,cluster,activefailover"
- VERBOSE=1 TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb:latest STARTER_MODES="single,cluster,activefailover"
- VERBOSE=1 TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb:latest STARTER_MODES="single,cluster,activefailover"
- VERBOSE=1 TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb-preview:latest STARTER_MODES="single,cluster,activefailover"
- VERBOSE=1 TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb-preview:latest STARTER_MODES="single,cluster,activefailover"
- VERBOSE=1 TEST_SUITE=run-tests-local-process GOIMAGE=gcr.io/gcr-for-testing/golang:1.13.6 ALPINE_IMAGE=gcr.io/gcr-for-testing/alpine:3.11 ARANGODB=gcr.io/gcr-for-testing/arangodb:3.6 STARTER_MODES="single"
- VERBOSE=1 TEST_SUITE=run-tests-local-process GOIMAGE=gcr.io/gcr-for-testing/golang:1.13.6 ALPINE_IMAGE=gcr.io/gcr-for-testing/alpine:3.11 ARANGODB=gcr.io/gcr-for-testing/arangodb/arangodb:latest STARTER_MODES="single"
- VERBOSE=1 TEST_SUITE=run-tests-local-process GOIMAGE=gcr.io/gcr-for-testing/golang:1.13.6 ALPINE_IMAGE=gcr.io/gcr-for-testing/alpine:3.11 ARANGODB=gcr.io/gcr-for-testing/arangodb:3.6 STARTER_MODES="single,cluster,activefailover" ON_PR=1
- VERBOSE=1 TEST_SUITE=run-tests-docker GOIMAGE=gcr.io/gcr-for-testing/golang:1.13.6 ALPINE_IMAGE=gcr.io/gcr-for-testing/alpine:3.11 ARANGODB=gcr.io/gcr-for-testing/arangodb:3.6 STARTER_MODES="single,cluster,activefailover" ON_PR=1
# - VERBOSE=1 TEST_SUITE=run-tests-local-process GOIMAGE=gcr.io/gcr-for-testing/golang:1.13.6 ALPINE_IMAGE=gcr.io/gcr-for-testing/alpine:3.11 ARANGODB=gcr.io/gcr-for-testing/arangodb/arangodb:latest STARTER_MODES="single,cluster,activefailover" ON_PR=1
# - VERBOSE=1 TEST_SUITE=run-tests-docker GOIMAGE=gcr.io/gcr-for-testing/golang:1.13.6 ALPINE_IMAGE=gcr.io/gcr-for-testing/alpine:3.11 ARANGODB=gcr.io/gcr-for-testing/arangodb/arangodb:latest STARTER_MODES="single,cluster,activefailover" ON_PR=1
# - VERBOSE=1 TEST_SUITE=run-tests-local-process GOIMAGE=gcr.io/gcr-for-testing/golang:1.13.6 ALPINE_IMAGE=gcr.io/gcr-for-testing/alpine:3.11 ARANGODB=gcr.io/gcr-for-testing/arangodb/arangodb-preview:latest STARTER_MODES="single,cluster,activefailover" ON_PR=1
# - VERBOSE=1 TEST_SUITE=run-tests-docker GOIMAGE=gcr.io/gcr-for-testing/golang:1.13.6 ALPINE_IMAGE=gcr.io/gcr-for-testing/alpine:3.11 ARANGODB=gcr.io/gcr-for-testing/arangodb/arangodb-preview:latest STARTER_MODES="single,cluster,activefailover" ON_PR=1

script: make $TEST_SUITE
script: 'if ([ "$TRAVIS_PULL_REQUEST" != "false" ] && [ "$ON_PR" != "" ]) || ([ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$ON_PR" == "" ]) ; then env; make $TEST_SUITE; fi'

# Install Docker CE
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
## Install Docker CE
#before_install:
# - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# - sudo apt-get update
# - sudo apt-get -y install docker-ce-cli
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM alpine:3.11
ARG IMAGE=alpine:3.11
FROM ${IMAGE}
MAINTAINER Max Neunhoeffer <max@arangodb.com>

COPY bin/linux/amd64/arangodb /app/
Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ VERSION_MAJOR := $(shell echo $(VERSION_MAJOR_MINOR) | cut -f 1 -d '.')
COMMIT := $(shell git rev-parse --short HEAD)
MAKEFILE := $(ROOTDIR)/Makefile

ALPINE_IMAGE ?= alpine:3.11

DOCKERCLI ?= $(shell which docker)
GOBUILDLINKTARGET := ../../../..

Expand All @@ -28,7 +30,7 @@ REPOPATH := $(ORGPATH)/$(REPONAME)

GOPATH := $(GOBUILDDIR)
GOVERSION := 1.13.6
GOIMAGE := golang:$(GOVERSION)
GOIMAGE ?= golang:$(GOVERSION)

GOOS ?= linux
GOARCH ?= amd64
Expand Down Expand Up @@ -101,6 +103,7 @@ DOCKER_CMD = $(DOCKERCLI) run \
-e GOOS=$(GOOS) \
-e GOARCH=$(GOARCH) \
-e CGO_ENABLED=0 \
-e TRAVIS=$(TRAVIS) \
$(DOCKER_PARAMS) \
-w /usr/code/ \
$(DOCKER_IMAGE)
Expand Down Expand Up @@ -149,7 +152,7 @@ $(TESTBIN): $(GOBUILDDIR) $(TEST_SOURCES) $(BIN)
$(DOCKER_CMD) go test -c -o "$(TEST_BIN)" ./test

docker: build
$(DOCKERCLI) build -t arangodb/arangodb-starter .
$(DOCKERCLI) build -t arangodb/arangodb-starter --build-arg "IMAGE=$(ALPINE_IMAGE)" .

docker-push: docker
ifneq ($(DOCKERNAMESPACE), arangodb)
Expand Down Expand Up @@ -196,7 +199,7 @@ run-tests-local-process-run:
$(DOCKER_CMD) /usr/code/bin/linux/amd64/test -test.timeout $(TEST_TIMEOUT) -test.v $(TESTOPTIONS)

_run-tests: build-test build
@TEST_MODES=$(TEST_MODES) STARTER_MODES=$(STARTER_MODES) STARTER=$(BIN) ENTERPRISE=$(ENTERPRISE) IP=$(IP) ARANGODB=$(ARANGODB) $(TESTBIN) -test.timeout $(TEST_TIMEOUT) -test.v $(TESTOPTIONS)
@TEST_MODES=$(TEST_MODES) STARTER_MODES=$(STARTER_MODES) STARTER=$(BIN) ENTERPRISE=$(ENTERPRISE) IP=$(IP) ARANGODB=$(ARANGODB) $(TESTBIN) -test.timeout $(TEST_TIMEOUT) -test.failfast -test.v $(TESTOPTIONS)

ifdef TRAVIS
run-tests-docker-pre: docker
Expand Down
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace golang.org/x/sys => golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a
require (
github.com/aktau/github-release v0.8.1
github.com/arangodb-helper/go-certificates v0.0.0-20180821055445-9fca24fc2680
github.com/arangodb/go-driver v0.0.0-20200624173407-d1c92a8bd2b8
github.com/arangodb/go-driver v0.0.0-20210608063820-cd7131034c24
github.com/arangodb/go-upgrade-rules v0.0.0-20200605091205-439fb1ee86e7
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/coreos/go-semver v0.3.0
Expand All @@ -17,7 +17,6 @@ require (
github.com/fatih/color v1.9.0
github.com/fsouza/go-dockerclient v1.6.5
github.com/github-release/github-release v0.8.1 // indirect
github.com/google/addlicense v0.0.0-20200622132530-df58acafd6d5 // indirect
github.com/inconshreveable/log15 v0.0.0-20200109203555-b30bc20e4fd1 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/kevinburke/rest v0.0.0-20200429221318-0d2892b400f8 // indirect
Expand All @@ -29,11 +28,9 @@ require (
github.com/ryanuber/columnize v2.1.0+incompatible
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.5.1
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 // indirect
github.com/voxelbrain/goptions v0.0.0-20180630082107-58cddc247ea2 // indirect
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/mod v0.3.0 // indirect
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 // indirect
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect
golang.org/x/tools v0.0.0-20200702044944-0cc1aa72b347 // indirect
)
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ github.com/arangodb-helper/go-certificates v0.0.0-20180821055445-9fca24fc2680 h1
github.com/arangodb-helper/go-certificates v0.0.0-20180821055445-9fca24fc2680/go.mod h1:xDyzBwyYzcEhsaDXtmxCNM4p5BrtuoVYYsRTuJqmCeg=
github.com/arangodb/go-driver v0.0.0-20200624173407-d1c92a8bd2b8 h1:kWyYp1Gtp4x458LYlk9uAoM5v0ifZX58frROb1pC7Jo=
github.com/arangodb/go-driver v0.0.0-20200624173407-d1c92a8bd2b8/go.mod h1:JG79qtPYRxUB6CdGWSH1XwpolSBjthuZX+Iaz/H38rA=
github.com/arangodb/go-driver v0.0.0-20210608063820-cd7131034c24 h1:Tmuxuw6asYMsGa73rB8vGcE4ipX+j1uBFsodYqtCJNE=
github.com/arangodb/go-driver v0.0.0-20210608063820-cd7131034c24/go.mod h1:3NUekcRLpgheFIGEwcOvxilEW73MV1queNKW58k7sdc=
github.com/arangodb/go-upgrade-rules v0.0.0-20200605091205-439fb1ee86e7 h1:zCY5fsv5apos+oAdd1bLr1UEFOHeIUDZCItbwU/u6XE=
github.com/arangodb/go-upgrade-rules v0.0.0-20200605091205-439fb1ee86e7/go.mod h1:RkPIG6JJ2pcJUoymc18NxAJGraZd+iAEVnOTDjZey/w=
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e h1:Xg+hGrY2LcQBbxd0ZFdbGSyRKTYMZCfBbw/pMJFOk1g=
Expand Down Expand Up @@ -102,11 +104,13 @@ github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/google/addlicense v0.0.0-20200622132530-df58acafd6d5 h1:m6Z1Cm53o4VecQFxKCnvULGfIT0Igo3MX131i+00IIo=
github.com/google/addlicense v0.0.0-20200622132530-df58acafd6d5/go.mod h1:EMjYTRimagHs1FwlIqKyX3wAM0u3rA+McvlIIWmSamA=
github.com/google/addlicense v0.0.0-20200817051935-6f4cd4aacc89/go.mod h1:EMjYTRimagHs1FwlIqKyX3wAM0u3rA+McvlIIWmSamA=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
Expand Down Expand Up @@ -235,6 +239,7 @@ github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
Expand Down Expand Up @@ -268,6 +273,7 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR
golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -297,6 +303,7 @@ golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200702044944-0cc1aa72b347 h1:/e4fNMHdLn7SQSxTrRZTma2xjQW6ELdxcnpqMhpo9X4=
golang.org/x/tools v0.0.0-20200702044944-0cc1aa72b347/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200818005847-188abfa75333/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
Expand Down
11 changes: 11 additions & 0 deletions pkg/definitions/server_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ package definitions

import (
"fmt"
"time"
)

// ServerType specifies the types of database servers.
Expand Down Expand Up @@ -63,6 +64,16 @@ func (s ServerType) PortOffset() int {
}
}

// InitialStopTimeout returns initial delay for process stopping
func (s ServerType) InitialStopTimeout() time.Duration {
switch s {
case ServerTypeDBServer, ServerTypeSingle, ServerTypeResilientSingle:
return 3 * time.Second
default:
return time.Second
}
}

// ProcessType returns the type of process needed to run a server of given type.
func (s ServerType) ProcessType() ProcessType {
switch s {
Expand Down
2 changes: 1 addition & 1 deletion service/process_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (p *processWrapper) run(startedCh chan<- struct{}) {
case <-p.stopping:
if p.s.stopping {
// Starter is being closed
terminateProcessWithActions(logProcess, p.proc, p.serverType, 10*time.Second, time.Minute)
terminateProcessWithActions(logProcess, p.proc, p.serverType, time.Second, time.Minute)
} else {
// Process restart
terminateProcessWithActions(logProcess, p.proc, p.serverType, 0, time.Minute)
Expand Down
23 changes: 11 additions & 12 deletions test/docker_activefailover_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ import (
// TestDockerActiveFailoverDefault runs 3 arangodb starters in docker with mode=activefailover
// and otherwise default settings.
func TestDockerActiveFailoverDefault(t *testing.T) {
log := GetLogger(t)
defer log.Clean()

needTestMode(t, testModeDocker)
needStarterMode(t, starterModeActiveFailover)
if os.Getenv("IP") == "" {
Expand All @@ -48,6 +51,7 @@ func TestDockerActiveFailoverDefault(t *testing.T) {
--starter.address=$IP \
--starter.mode=activefailover
*/

volID1 := createDockerID("vol-starter-test-activefailover-default1-")
createDockerVolume(t, volID1)
defer removeDockerVolume(t, volID1)
Expand Down Expand Up @@ -132,12 +136,9 @@ func TestDockerActiveFailoverDefault(t *testing.T) {
testResilientSingle(t, insecureStarterEndpoint(2*portIncrement), false, false)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, insecureStarterEndpoint(0*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(1*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(2*portIncrement))
waitForCallFunction(t, ShutdownStarterCall(insecureStarterEndpoint(0*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(1*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(2*portIncrement)))
}

// TestDockerActiveFailover2Instance runs 3 arangodb starters in docker with mode=activefailover
Expand Down Expand Up @@ -243,10 +244,8 @@ func TestDockerActiveFailover2Instance(t *testing.T) {
testResilientSingle(t, insecureStarterEndpoint(2*portIncrement), false, true)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, insecureStarterEndpoint(0*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(1*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(2*portIncrement))
waitForCallFunction(t,
ShutdownStarterCall(insecureStarterEndpoint(0*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(1*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(2*portIncrement)))
}
12 changes: 4 additions & 8 deletions test/docker_activefailover_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ func TestDockerActiveFailoverLocal(t *testing.T) {
testResilientSingle(t, insecureStarterEndpoint(0*portIncrement), false, false)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, insecureStarterEndpoint(0*portIncrement))
waitForCallFunction(t,
ShutdownStarterCall(insecureStarterEndpoint(0*portIncrement)))
}

// TestDockerActiveFailoverSecure runs the arangodb starter in docker with mode `activefailover`,
Expand Down Expand Up @@ -144,8 +142,6 @@ func TestDockerResilientActiveFailoverSecure(t *testing.T) {
testResilientSingle(t, secureStarterEndpoint(0*portIncrement), true, false)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, secureStarterEndpoint(0*portIncrement))
waitForCallFunction(t,
ShutdownStarterCall(secureStarterEndpoint(0*portIncrement)))
}
17 changes: 8 additions & 9 deletions test/docker_cluster_default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,10 @@ func TestDockerClusterDefault(t *testing.T) {
testCluster(t, insecureStarterEndpoint(2*portIncrement), false)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, insecureStarterEndpoint(0*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(1*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(2*portIncrement))
waitForCallFunction(t,
ShutdownStarterCall(insecureStarterEndpoint(0*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(1*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(2*portIncrement)))
}

// TestOldDockerClusterDefault runs 3 arangodb starters in docker with default settings.
Expand Down Expand Up @@ -235,7 +233,8 @@ func TestOldDockerClusterDefault(t *testing.T) {
if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, insecureStarterEndpoint(0*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(1*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(2*portIncrement))
waitForCallFunction(t,
ShutdownStarterCall(insecureStarterEndpoint(0*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(1*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(2*portIncrement)))
}
20 changes: 8 additions & 12 deletions test/docker_cluster_diff_logdir_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,10 @@ func TestDockerClusterDifferentLogDir(t *testing.T) {
testCluster(t, insecureStarterEndpoint(2*portIncrement), false)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, insecureStarterEndpoint(0*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(1*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(2*portIncrement))
waitForCallFunction(t,
ShutdownStarterCall(insecureStarterEndpoint(0*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(1*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(2*portIncrement)))

check := func(rootDir string, expectedFileCount int) {
files, err := getRecursiveLogFiles(rootDir)
Expand Down Expand Up @@ -282,12 +280,10 @@ func TestDockerClusterDifferentLogDirNoLog2File(t *testing.T) {
testCluster(t, insecureStarterEndpoint(2*portIncrement), false)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, insecureStarterEndpoint(0*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(1*portIncrement))
ShutdownStarter(t, insecureStarterEndpoint(2*portIncrement))
waitForCallFunction(t,
ShutdownStarterCall(insecureStarterEndpoint(0*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(1*portIncrement)),
ShutdownStarterCall(insecureStarterEndpoint(2*portIncrement)))

check := func(rootDir string, expectedFileCount int) {
files, err := getRecursiveLogFiles(rootDir)
Expand Down
10 changes: 4 additions & 6 deletions test/docker_cluster_diff_ports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,8 @@ func TestDockerClusterDifferentPorts(t *testing.T) {
testCluster(t, "http://localhost:8000", false)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, "http://localhost:6000")
ShutdownStarter(t, "http://localhost:7000")
ShutdownStarter(t, "http://localhost:8000")
waitForCallFunction(t,
ShutdownStarterCall("http://localhost:6000"),
ShutdownStarterCall("http://localhost:7000"),
ShutdownStarterCall("http://localhost:8000"))
}
18 changes: 6 additions & 12 deletions test/docker_cluster_local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ func TestDockerClusterLocal(t *testing.T) {
testCluster(t, insecureStarterEndpoint(0*portIncrement), false)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, insecureStarterEndpoint(0*portIncrement))
waitForCallFunction(t,
ShutdownStarterCall(insecureStarterEndpoint(0*portIncrement)))
}

// TestDockerClusterLocalAgencySize1 runs the arangodb starter in docker
Expand Down Expand Up @@ -141,10 +139,8 @@ func TestDockerClusterLocalAgencySize1(t *testing.T) {
testCluster(t, insecureStarterEndpoint(0*portIncrement), false)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, insecureStarterEndpoint(0*portIncrement))
waitForCallFunction(t,
ShutdownStarterCall(insecureStarterEndpoint(0*portIncrement)))
}

// TestOldDockerClusterLocal runs the arangodb starter in docker with `--local`
Expand Down Expand Up @@ -197,8 +193,6 @@ func TestOldDockerClusterLocal(t *testing.T) {
testCluster(t, insecureStarterEndpoint(0*portIncrement), false)
}

if isVerbose {
t.Log("Waiting for termination")
}
ShutdownStarter(t, insecureStarterEndpoint(0*portIncrement))
waitForCallFunction(t,
ShutdownStarterCall(insecureStarterEndpoint(0*portIncrement)))
}
Loading