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

Context conflict with xk6-browser #106

Closed
pablochacin opened this issue Feb 9, 2023 · 3 comments
Closed

Context conflict with xk6-browser #106

pablochacin opened this issue Feb 9, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@pablochacin
Copy link
Collaborator

When running an script that injects faults using the disruptor using a custom build that includes also the xk6-browser extension, the following error is reported.

ERRO[0000] GoError: error creating ServiceDisruptor: error creating ServiceDisruptor: client rate limiter Wait returned an error: context canceled

This happens even if the script does not use the browser extension (e.g. this demo script)

Running a script with this custom build (k6 + xk6-disruptor+ xk6-browser) that use the browser but not the disruptor works as expected.

@pablochacin
Copy link
Collaborator Author

pablochacin commented Feb 9, 2023

This context can be traced back to:

	k8s, err := kubernetes.New(vu.Context())

So it is in principle the VU's context.

The disruptor does not return until the fault injection ends. Therefore it is unlikely that this VU ends while the fault injection is running.

@pablochacin
Copy link
Collaborator Author

The cause of this behavior is a change in the way the context is managed in k6. This change appears in the k6 v0.41.1 which is a requirement for xk6-browser. If the binary is compiled without xk6-browser the version used is v0.41.0.

@pablochacin pablochacin added the bug Something isn't working label Feb 9, 2023
@pablochacin
Copy link
Collaborator Author

Fixed by #109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant