mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests: Rename linearizability tests to robustness
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
cb2a22e5d1
commit
d475cf81a0
@ -1,4 +1,4 @@
|
|||||||
name: Linearizability Nightly
|
name: Robustness Nightly
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
on:
|
on:
|
||||||
# schedules always run against the main branch, hence we have to create separate jobs
|
# schedules always run against the main branch, hence we have to create separate jobs
|
||||||
@ -8,21 +8,21 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
test-main:
|
test-main:
|
||||||
# GHA has a maximum amount of 6h execution time, we try to get done within 3h
|
# GHA has a maximum amount of 6h execution time, we try to get done within 3h
|
||||||
uses: ./.github/workflows/linearizability-template.yaml
|
uses: ./.github/workflows/robustness-template.yaml
|
||||||
with:
|
with:
|
||||||
ref: main
|
ref: main
|
||||||
count: 100
|
count: 100
|
||||||
testTimeout: 200m
|
testTimeout: 200m
|
||||||
artifactName: test-main
|
artifactName: test-main
|
||||||
test-35:
|
test-35:
|
||||||
uses: ./.github/workflows/linearizability-template.yaml
|
uses: ./.github/workflows/robustness-template.yaml
|
||||||
with:
|
with:
|
||||||
ref: release-3.5
|
ref: release-3.5
|
||||||
count: 100
|
count: 100
|
||||||
testTimeout: 200m
|
testTimeout: 200m
|
||||||
artifactName: test-35
|
artifactName: test-35
|
||||||
test-34:
|
test-34:
|
||||||
uses: ./.github/workflows/linearizability-template.yaml
|
uses: ./.github/workflows/robustness-template.yaml
|
||||||
with:
|
with:
|
||||||
ref: release-3.4
|
ref: release-3.4
|
||||||
count: 100
|
count: 100
|
@ -1,4 +1,4 @@
|
|||||||
name: Reusable Linearizability Workflow
|
name: Reusable Robustness Workflow
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
@ -43,12 +43,12 @@ jobs:
|
|||||||
make build
|
make build
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
- name: test-linearizability
|
- name: test-robustness
|
||||||
run: |
|
run: |
|
||||||
# Use --failfast to avoid overriding report generated by failed test
|
# Use --failfast to avoid overriding report generated by failed test
|
||||||
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} --failfast --run TestLinearizability' RESULTS_DIR=/tmp/linearizability make test-linearizability
|
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count ${{ inputs.count }} --timeout ${{ inputs.testTimeout }} --failfast --run TestRobustness' RESULTS_DIR=/tmp/results make test-robustness
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifactName }}
|
name: ${{ inputs.artifactName }}
|
||||||
path: /tmp/linearizability/*
|
path: /tmp/results/*
|
@ -1,9 +1,9 @@
|
|||||||
name: Linearizability
|
name: Robustness
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
permissions: read-all
|
permissions: read-all
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
uses: ./.github/workflows/linearizability-template.yaml
|
uses: ./.github/workflows/robustness-template.yaml
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.ref }}
|
ref: ${{ github.ref }}
|
||||||
count: 15
|
count: 15
|
6
Makefile
6
Makefile
@ -33,9 +33,9 @@ test-e2e: build
|
|||||||
test-e2e-release: build
|
test-e2e-release: build
|
||||||
PASSES="release e2e" ./scripts/test.sh $(GO_TEST_FLAGS)
|
PASSES="release e2e" ./scripts/test.sh $(GO_TEST_FLAGS)
|
||||||
|
|
||||||
.PHONY: test-linearizability
|
.PHONY: test-robustness
|
||||||
test-linearizability:
|
test-robustness:
|
||||||
PASSES="linearizability" ./scripts/test.sh $(GO_TEST_FLAGS)
|
PASSES="robustness" ./scripts/test.sh $(GO_TEST_FLAGS)
|
||||||
|
|
||||||
.PHONY: fuzz
|
.PHONY: fuzz
|
||||||
fuzz:
|
fuzz:
|
||||||
|
@ -23,7 +23,7 @@ etcd is a distributed reliable key-value store for the most critical data of a d
|
|||||||
|
|
||||||
etcd is written in Go and uses the [Raft][] consensus algorithm to manage a highly-available replicated log.
|
etcd is written in Go and uses the [Raft][] consensus algorithm to manage a highly-available replicated log.
|
||||||
|
|
||||||
etcd is used [in production by many companies](./ADOPTERS.md), and the development team stands behind it in critical deployment scenarios, where etcd is frequently teamed with applications such as [Kubernetes][k8s], [locksmith][], [vulcand][], [Doorman][], and many others. Reliability is further ensured by [**rigorous testing**](https://github.com/etcd-io/etcd/tree/main/tests/linearizability).
|
etcd is used [in production by many companies](./ADOPTERS.md), and the development team stands behind it in critical deployment scenarios, where etcd is frequently teamed with applications such as [Kubernetes][k8s], [locksmith][], [vulcand][], [Doorman][], and many others. Reliability is further ensured by rigorous [**robustness testing**](https://github.com/etcd-io/etcd/tree/main/tests/robustness).
|
||||||
|
|
||||||
See [etcdctl][etcdctl] for a simple command line client.
|
See [etcdctl][etcdctl] for a simple command line client.
|
||||||
|
|
||||||
|
@ -124,9 +124,9 @@ function e2e_pass {
|
|||||||
run_for_module "tests" go_test "./common/..." "keep_going" : --tags=e2e -timeout="${TIMEOUT:-30m}" "${RUN_ARG[@]}" "$@"
|
run_for_module "tests" go_test "./common/..." "keep_going" : --tags=e2e -timeout="${TIMEOUT:-30m}" "${RUN_ARG[@]}" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
function linearizability_pass {
|
function robustness_pass {
|
||||||
# e2e tests are running pre-build binary. Settings like --race,-cover,-cpu does not have any impact.
|
# e2e tests are running pre-build binary. Settings like --race,-cover,-cpu does not have any impact.
|
||||||
run_for_module "tests" go_test "./linearizability/..." "keep_going" : -timeout="${TIMEOUT:-30m}" "${RUN_ARG[@]}" "$@"
|
run_for_module "tests" go_test "./robustness/..." "keep_going" : -timeout="${TIMEOUT:-30m}" "${RUN_ARG[@]}" "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
function integration_e2e_pass {
|
function integration_e2e_pass {
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package linearizability
|
package robustness
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@ -22,8 +22,8 @@ import (
|
|||||||
|
|
||||||
"go.etcd.io/etcd/api/v3/mvccpb"
|
"go.etcd.io/etcd/api/v3/mvccpb"
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
"go.etcd.io/etcd/tests/v3/linearizability/identity"
|
"go.etcd.io/etcd/tests/v3/robustness/identity"
|
||||||
"go.etcd.io/etcd/tests/v3/linearizability/model"
|
"go.etcd.io/etcd/tests/v3/robustness/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
type recordingClient struct {
|
type recordingClient struct {
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package linearizability
|
package robustness
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package linearizability
|
package robustness
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@ -25,7 +25,7 @@ import (
|
|||||||
"golang.org/x/sync/errgroup"
|
"golang.org/x/sync/errgroup"
|
||||||
|
|
||||||
"go.etcd.io/etcd/tests/v3/framework/e2e"
|
"go.etcd.io/etcd/tests/v3/framework/e2e"
|
||||||
"go.etcd.io/etcd/tests/v3/linearizability/model"
|
"go.etcd.io/etcd/tests/v3/robustness/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -76,7 +76,7 @@ var (
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLinearizability(t *testing.T) {
|
func TestRobustness(t *testing.T) {
|
||||||
testRunner.BeforeTest(t)
|
testRunner.BeforeTest(t)
|
||||||
type scenario struct {
|
type scenario struct {
|
||||||
name string
|
name string
|
||||||
@ -157,7 +157,7 @@ func TestLinearizability(t *testing.T) {
|
|||||||
lg := zaptest.NewLogger(t)
|
lg := zaptest.NewLogger(t)
|
||||||
scenario.config.Logger = lg
|
scenario.config.Logger = lg
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
testLinearizability(ctx, t, lg, scenario.config, scenario.traffic, FailpointConfig{
|
testRobustness(ctx, t, lg, scenario.config, scenario.traffic, FailpointConfig{
|
||||||
failpoint: scenario.failpoint,
|
failpoint: scenario.failpoint,
|
||||||
count: 1,
|
count: 1,
|
||||||
retries: 3,
|
retries: 3,
|
||||||
@ -167,7 +167,7 @@ func TestLinearizability(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func testLinearizability(ctx context.Context, t *testing.T, lg *zap.Logger, config e2e.EtcdProcessClusterConfig, traffic *trafficConfig, failpoint FailpointConfig) {
|
func testRobustness(ctx context.Context, t *testing.T, lg *zap.Logger, config e2e.EtcdProcessClusterConfig, traffic *trafficConfig, failpoint FailpointConfig) {
|
||||||
r := report{lg: lg}
|
r := report{lg: lg}
|
||||||
var err error
|
var err error
|
||||||
r.clus, err = e2e.NewEtcdProcessCluster(ctx, t, e2e.WithConfig(&config))
|
r.clus, err = e2e.NewEtcdProcessCluster(ctx, t, e2e.WithConfig(&config))
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package linearizability
|
package robustness
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
@ -24,7 +24,7 @@ import (
|
|||||||
|
|
||||||
"go.etcd.io/etcd/api/v3/etcdserverpb"
|
"go.etcd.io/etcd/api/v3/etcdserverpb"
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
"go.etcd.io/etcd/tests/v3/linearizability/identity"
|
"go.etcd.io/etcd/tests/v3/robustness/identity"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ValidateOperationHistoryAndReturnVisualize return visualize as porcupine.linearizationInfo used to generate visualization is private.
|
// ValidateOperationHistoryAndReturnVisualize return visualize as porcupine.linearizationInfo used to generate visualization is private.
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package linearizability
|
package robustness
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package linearizability
|
package robustness
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@ -30,8 +30,8 @@ import (
|
|||||||
"go.etcd.io/etcd/api/v3/mvccpb"
|
"go.etcd.io/etcd/api/v3/mvccpb"
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
"go.etcd.io/etcd/tests/v3/framework/e2e"
|
"go.etcd.io/etcd/tests/v3/framework/e2e"
|
||||||
"go.etcd.io/etcd/tests/v3/linearizability/identity"
|
"go.etcd.io/etcd/tests/v3/robustness/identity"
|
||||||
"go.etcd.io/etcd/tests/v3/linearizability/model"
|
"go.etcd.io/etcd/tests/v3/robustness/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
package linearizability
|
package robustness
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@ -28,7 +28,7 @@ import (
|
|||||||
"go.etcd.io/etcd/api/v3/mvccpb"
|
"go.etcd.io/etcd/api/v3/mvccpb"
|
||||||
clientv3 "go.etcd.io/etcd/client/v3"
|
clientv3 "go.etcd.io/etcd/client/v3"
|
||||||
"go.etcd.io/etcd/tests/v3/framework/e2e"
|
"go.etcd.io/etcd/tests/v3/framework/e2e"
|
||||||
"go.etcd.io/etcd/tests/v3/linearizability/model"
|
"go.etcd.io/etcd/tests/v3/robustness/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
func collectClusterWatchEvents(ctx context.Context, t *testing.T, lg *zap.Logger, clus *e2e.EtcdProcessCluster) [][]watchResponse {
|
func collectClusterWatchEvents(ctx context.Context, t *testing.T, lg *zap.Logger, clus *e2e.EtcdProcessCluster) [][]watchResponse {
|
Loading…
x
Reference in New Issue
Block a user