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

test: some integration tests fail when using simulated time #10568

Closed
jmarantz opened this issue Mar 29, 2020 · 3 comments · Fixed by #12527
Closed

test: some integration tests fail when using simulated time #10568

jmarantz opened this issue Mar 29, 2020 · 3 comments · Fixed by #12527
Assignees
Labels
area/test flakes bug no stalebot Disables stalebot from closing an issue

Comments

@jmarantz
Copy link
Contributor

It's not clear if these are all due to the same issue or not.

e.g.
test/integration:filter_manager_integration_test hangs when run under sim-time.

@jmarantz
Copy link
Contributor Author

This blocks #4160

@jmarantz
Copy link
Contributor Author

with #10551 , test/extensions/filters/http/cache:cache_filter_integration_test passes consistently, but only with a real-time polling delay of 50ms (+ or -) which I believe should not be necessary.

@jmarantz
Copy link
Contributor Author

More details on the cache_filter_integration_test.

[ RUN      ] Protocols/CacheIntegrationTest.GetRequestWithBodyAndTrailers/IPv4_HttpDownstream_HttpUpstream
test/extensions/filters/http/cache/cache_filter_integration_test.cc:115: Failure
Value of: response->headers()
Expected: is a superset of headers:
':status', '200'
'date', 'Thu, 01 Jan 1970 01:00:00 GMT'
'cache-control', 'public,max-age=3600'
'content-length', '42'

  Actual: 16-byte object <D8-A7 9C-04 00-00 00-00 78-AF 9C-04 00-00 00-00> (of type Envoy::Http::ResponseHeaderMap), where the following matchers don't match any elements:
matcher #1: is equal to ("date", "Thu, 01 Jan 1970 01:00:00 GMT")
Stack trace:
  0x1dc9846: Envoy::Extensions::HttpFilters::Cache::CacheIntegrationTest_GetRequestWithBodyAndTrailers_Test::TestBody()
  0x48c6a74: testing::internal::HandleSehExceptionsInMethodIfSupported<>()
  0x48b74cb: testing::internal::HandleExceptionsInMethodIfSupported<>()
  0x48a4d93: testing::Test::Run()
  0x48a5757: testing::TestInfo::Run()
... Google Test internal frames ...

[  FAILED  ] Protocols/CacheIntegrationTest.GetRequestWithBodyAndTrailers/IPv4_HttpDownstream_HttpUpstream, where GetParam() = 12-byte object <00-00 00-00 00-00 00-00 00-00 00-00> (365 ms)

The code in question is here:

    response->waitForEndStream();
    EXPECT_TRUE(response->complete());
    EXPECT_THAT(response->headers(), IsSupersetOfHeaders(response_headers));

It appears to me that response->headers() is populated, or at least std::moved in the main thread, so I am not understanding how there can be a race here, but adding the real-time delay appears to be needed.

@htuch htuch added the bug label Mar 30, 2020
@mattklein123 mattklein123 added the no stalebot Disables stalebot from closing an issue label Mar 30, 2020
@mattklein123 mattklein123 self-assigned this Aug 6, 2020
mattklein123 added a commit that referenced this issue Aug 7, 2020
Fixes #12480
Fixes #10568

Signed-off-by: Matt Klein <mklein@lyft.com>
mattklein123 added a commit that referenced this issue Aug 7, 2020
Fixes #12480
Fixes #10568

Signed-off-by: Matt Klein <mklein@lyft.com>
mattklein123 added a commit that referenced this issue Aug 8, 2020
Fixes #12480
Fixes #10568

Signed-off-by: Matt Klein <mklein@lyft.com>
mattklein123 added a commit that referenced this issue Aug 8, 2020
Fixes #12480
Fixes #10568

Signed-off-by: Matt Klein <mklein@lyft.com>
mattklein123 added a commit that referenced this issue Aug 9, 2020
Fixes #12480
Fixes #10568

Signed-off-by: Matt Klein <mklein@lyft.com>
mattklein123 added a commit that referenced this issue Aug 10, 2020
Fixes #12480
Fixes #10568

Signed-off-by: Matt Klein <mklein@lyft.com>
mattklein123 added a commit that referenced this issue Aug 11, 2020
Fixes #12480
Fixes #10568

Signed-off-by: Matt Klein <mklein@lyft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test flakes bug no stalebot Disables stalebot from closing an issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants