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

Fix flaky test: End2endServerTryCancelTest.ResponseStreamServerCancelAfter #5493

Merged
merged 2 commits into from
Mar 1, 2016

Conversation

sreecha
Copy link
Contributor

@sreecha sreecha commented Mar 1, 2016

Fix for #5481

@sreecha sreecha added lang/c++ flaky test disposition/BUILDNURSE For all buildnurse related build/test failures and flakes labels Mar 1, 2016
@sreecha
Copy link
Contributor Author

sreecha commented Mar 1, 2016

All the relevant tests passed.

yang-g added a commit that referenced this pull request Mar 1, 2016
Fix flaky test:  End2endServerTryCancelTest.ResponseStreamServerCancelAfter
@yang-g yang-g merged commit 6963453 into grpc:master Mar 1, 2016
@vjpai
Copy link
Member

vjpai commented Mar 1, 2016

Wait, what signal is this test giving us now? Isn't expect_le essentially a
tautology? Maybe this test needs to be rewritten to better express its
intention?

On Tue, Mar 1, 2016, 10:43 AM Yang Gao notifications@github.com wrote:

Merged #5493 #5493.


Reply to this email directly or view it on GitHub
#5493 (comment).

@sreecha
Copy link
Contributor Author

sreecha commented Mar 1, 2016

That is true! :) - With this PR, I guess this is looking even more redundant (previously, there were not many EXPECT_LE checks)..

I guess the only value is in CANCEL_BEFORE_PROCESSING case where we do EXPECT_EQ
FWIW, The test does check all the other conditions of interest (like EXPECT_EQ(grpc::StatusCode::CANCELLED, s.error_code() and EXPECT_TRUE(context->IsCancelled()) in test_service_impl.cc etc..);

I will rewrite the test to clean up these redundant checks..

@sreecha sreecha deleted the server_try_cancel_test branch March 1, 2016 19:41
@vjpai
Copy link
Member

vjpai commented Mar 1, 2016

I'm not suggesting rewriting the code to eliminate redundant checks. I'm
suggesting rewriting the code to actually capture the intent of what was
there before. What was the actual intent of the test? And can we figure out
how to actually make code that represents that intention?

On Tue, Mar 1, 2016, 11:37 AM Sree Kuchibhotla notifications@github.com
wrote:

That is true! :) - With this PR, I guess this is looking even more
redundant (previously, there were not many EXPECT_LE checks)..

I guess the only value is in CANCEL_BEFORE_PROCESSING case where we do
EXPECT_EQ
FWIW, The test does check all the other conditions of interest (like EXPECT_EQ(grpc::StatusCode::CANCELLED,
s.error_code() and EXPECT_TRUE(context->IsCancelled()) in
test_service_impl.cc etc..);

I will rewrite the test to clean up these redundant checks..


Reply to this email directly or view it on GitHub
#5493 (comment).

@sreecha
Copy link
Contributor Author

sreecha commented Mar 1, 2016

Understood.

The actual intent of those test cases (in those cases where we had EXPECT_LE checks) was to somehow verify that the RPC was successfully cancelled in parallel while the request was being processed by the server (or client).

Other than verifying that the RPC does in fact get cancelled at the end (and also manually verifying - across several repeated test runs - that the client/server are processing a random number of messages between [0 to num_of_intended_msgs]), I cannot think of any other way to do this :(..

@ctiller
Copy link
Member

ctiller commented Mar 1, 2016

Probably worth filing an issue and thinking about it further down the road.

It seems like a problem someone will solve in the middle of a deep sleep in
a few weeks time.

On Tue, Mar 1, 2016 at 12:39 PM Sree Kuchibhotla notifications@github.com
wrote:

Understood.

The actual intent of those test cases (in those cases where we had
EXPECT_LE checks) was to somehow verify that the RPC was successfully
cancelled in parallel while the request was being processed by the server
(or client).

Other than verifying that the RPC does in fact get cancelled at the end
(and also manually verifying - across several repeated test runs - that the
client/server are processing a random number of messages between [0 to
num_of_intended_msgs]), I cannot think of any other way to do this :(..


Reply to this email directly or view it on GitHub
#5493 (comment).

@sreecha
Copy link
Contributor Author

sreecha commented Mar 1, 2016

Yeah. Created: #5520

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes disposition/BUILDNURSE For all buildnurse related build/test failures and flakes lang/c++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants