test: stabilize coverage for lua filter.#18927
Merged
yanavlasov merged 1 commit intoenvoyproxy:mainfrom Nov 10, 2021
tkovacs-2:lua_filter_coverage
Merged
test: stabilize coverage for lua filter.#18927yanavlasov merged 1 commit intoenvoyproxy:mainfrom tkovacs-2:lua_filter_coverage
yanavlasov merged 1 commit intoenvoyproxy:mainfrom
tkovacs-2:lua_filter_coverage
Conversation
Signed-off-by: Tamas Kovacs <[email protected]>
yanavlasov
approved these changes
Nov 10, 2021
mpuncel
added a commit
to mpuncel/envoy
that referenced
this pull request
Nov 10, 2021
* main: (71 commits) bazel: fix macOS build (envoyproxy#18920) http: switching from 100 to 1xx (envoyproxy#18904) grpc: implement BufferedAsyncClient for bidirectional gRPC stream (envoyproxy#18129) bazel: add repository arg to benchmark_test (envoyproxy#18795) rocketmq_proxy: Improvement for map find (envoyproxy#18909) tls: unit test: spiffe signed by intermediate cert (envoyproxy#18914) Test for FilterConfigPerRoute dtor called on worker thread. (envoyproxy#18927) deps: Bump `com_google_protobuf` -> 3.19.1 (envoyproxy#18930) deps: Bump `com_googlesource_code_re2` -> 2021-11-01 (envoyproxy#18933) cvescan: Move cvescan data to yaml (envoyproxy#18947) remove unnecessary file level not unimplemented hide annotation (envoyproxy#18924) test: moving echo test (envoyproxy#18938) test: fixing a test flake (envoyproxy#18899) deps: Revert pyparsing bump (envoyproxy#18946) deps: Bump `build_bazel_rules_apple` -> 0.32.0 (envoyproxy#18932) deps: Bump `com_github_bazelbuild_buildtools` -> 4.2.3 (envoyproxy#18931) build(deps): bump pycparser from 2.20 to 2.21 in /tools/dependency (envoyproxy#18936) quic: supporting connections with zero initial available streams (envoyproxy#18775) test: moving proxy proto (envoyproxy#18939) build(deps): bump pyparsing from 3.0.4 to 3.0.5 in /tools/dependency (envoyproxy#18937) ... Signed-off-by: Michael Puncel <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Message: Add test for lua FilterConfigPerRoute dtor called on worker thread.
Additional Description:
There is a conditional block in
~FilterConfigPerRoute.Only the testcase
LuaIntegrationTest.RdsTestOfLuaPerRoutegenerates coverage there but even that depends on scheduling:Every thread has a shared pointer to the route config including the per route lua script.
When the RDS updates the routing, all threads assign the new value to the shared pointer.
It is not predictable which will do the last assignment and actually call the destructor of the previous pointed route config.
If last one is worker thread the block is covered if not it is not covered.
(For validation, some delay in the lamda at the beginning of
Envoy::Router::RdsRouteConfigProviderImpl::onConfigUpdate()like{ if (factory_context_.mainThreadDispatcher().isThreadSafe()) {sleep(3);} tls->config = ... }will make the uncovered case permanent)If the conditional block in
~FilterConfigPerRouteis accidentally uncovered then the per folder coverage is dropped below limit and the causes sporadic CI failure.New test is added to ensure coverage is generated in every run.
Risk Level: None
Testing: New testcase is added.
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A