Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E test execution is flaky #147

Closed
pablochacin opened this issue Apr 28, 2023 · 2 comments
Closed

E2E test execution is flaky #147

pablochacin opened this issue Apr 28, 2023 · 2 comments
Assignees

Comments

@pablochacin
Copy link
Collaborator

pablochacin commented Apr 28, 2023

Execution is flaky when multiple tests are executed concurrently. For example:

--- FAIL: Test_ServiceDisruptor (97.43s)
    --- FAIL: Test_ServiceDisruptor/Inject_HTTP_error_500 (20.09s)
        service_e2e_test.go:50: error deploying application httpbin: failed to create pod httpbin in namespace test-pods47wnl: pod httpbin not ready after 20.000000: 
--- FAIL: Test_PodDisruptor (0.00s)
    pod_e2e_test.go:31: failed to create cluster config: host port is not available 30000
FAIL
FAIL	github.com/grafana/xk6-disruptor/e2e/disruptors	97.485s

However, executing this tests individually runs correctly:

go test -tags e2e ./e2e/disruptors/ -count 1
ok  	github.com/grafana/xk6-disruptor/e2e/disruptors	184.771s
@pablochacin pablochacin changed the title Improve e2e tests E2E test execution is flaky Apr 28, 2023
@pablochacin
Copy link
Collaborator Author

e2e test for agent and pod disruptor collides because both use the port mapping for grpc services:

e2e/agent/agent_e2e_test.go:	grpcPort := cluster.NodePort{
e2e/agent/agent_e2e_test.go-		NodePort: 30000,
e2e/agent/agent_e2e_test.go-		HostPort: 30000,
--
e2e/disruptors/pod_e2e_test.go:	grpcPort := cluster.NodePort{
e2e/disruptors/pod_e2e_test.go-		NodePort: 30000,
e2e/disruptors/pod_e2e_test.go-		HostPort: 30000,

@pablochacin
Copy link
Collaborator Author

Fixed by #160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant