mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests: Use golang count to repeat tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
7f70b8cf76
commit
a573d8af69
2
.github/workflows/linearizability.yaml
vendored
2
.github/workflows/linearizability.yaml
vendored
@ -13,7 +13,7 @@ jobs:
|
|||||||
make build
|
make build
|
||||||
mkdir -p /tmp/linearizability
|
mkdir -p /tmp/linearizability
|
||||||
cat server/etcdserver/raft.fail.go
|
cat server/etcdserver/raft.fail.go
|
||||||
EXPECT_DEBUG=true GO_TEST_FLAGS=-v RESULTS_DIR=/tmp/linearizability make test-linearizability
|
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count 60 --failfast --run TestLinearizability' RESULTS_DIR=/tmp/linearizability make test-linearizability
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
|
@ -34,8 +34,6 @@ const (
|
|||||||
minimalQPS = 100.0
|
minimalQPS = 100.0
|
||||||
// maximalQPS limits number of requests send to etcd to avoid linearizability analysis taking too long.
|
// maximalQPS limits number of requests send to etcd to avoid linearizability analysis taking too long.
|
||||||
maximalQPS = 200.0
|
maximalQPS = 200.0
|
||||||
// failpointTriggersCount
|
|
||||||
failpointTriggersCount = 60
|
|
||||||
// waitBetweenFailpointTriggers
|
// waitBetweenFailpointTriggers
|
||||||
waitBetweenFailpointTriggers = time.Second
|
waitBetweenFailpointTriggers = time.Second
|
||||||
)
|
)
|
||||||
@ -74,23 +72,21 @@ func TestLinearizability(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, tc := range tcs {
|
for _, tc := range tcs {
|
||||||
for i := 0; i < failpointTriggersCount; i++ {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
failpoint := FailpointConfig{
|
||||||
failpoint := FailpointConfig{
|
failpoint: tc.failpoint,
|
||||||
failpoint: tc.failpoint,
|
count: 1,
|
||||||
count: 1,
|
retries: 3,
|
||||||
retries: 3,
|
waitBetweenTriggers: waitBetweenFailpointTriggers,
|
||||||
waitBetweenTriggers: waitBetweenFailpointTriggers,
|
}
|
||||||
}
|
traffic := trafficConfig{
|
||||||
traffic := trafficConfig{
|
minimalQPS: minimalQPS,
|
||||||
minimalQPS: minimalQPS,
|
maximalQPS: maximalQPS,
|
||||||
maximalQPS: maximalQPS,
|
clientCount: 8,
|
||||||
clientCount: 8,
|
traffic: DefaultTraffic,
|
||||||
traffic: DefaultTraffic,
|
}
|
||||||
}
|
testLinearizability(context.Background(), t, tc.config, failpoint, traffic)
|
||||||
testLinearizability(context.Background(), t, tc.config, failpoint, traffic)
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user