Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: components/grpc_support/bidirectional_stream_unittest.cc

Issue 2570783005: Disable flaky test BidirectionalStreamDelayRequestHeadersUntilFlush/BidirectionalStreamTest.StreamF… (Closed)
Patch Set: git cl format. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdint.h> 5 #include <stdint.h>
6 #include <list> 6 #include <list>
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 GetParam()); 523 GetParam());
524 char read_buffer[1]; 524 char read_buffer[1];
525 bidirectional_stream_read(test.stream, read_buffer, sizeof(read_buffer)); 525 bidirectional_stream_read(test.stream, read_buffer, sizeof(read_buffer));
526 test.BlockForDone(); 526 test.BlockForDone();
527 ASSERT_TRUE(test.read_data.empty()); 527 ASSERT_TRUE(test.read_data.empty());
528 ASSERT_EQ(TestBidirectionalStreamCallback::ON_FAILED, test.response_step); 528 ASSERT_EQ(TestBidirectionalStreamCallback::ON_FAILED, test.response_step);
529 ASSERT_EQ(net::ERR_UNEXPECTED, test.net_error); 529 ASSERT_EQ(net::ERR_UNEXPECTED, test.net_error);
530 bidirectional_stream_destroy(test.stream); 530 bidirectional_stream_destroy(test.stream);
531 } 531 }
532 532
533 TEST_P(BidirectionalStreamTest, StreamFailBeforeReadIsExecutedOnNetworkThread) { 533 // Flaky on Android. http://crbug.com/674128
534 #if defined(OS_ANDROID)
535 #define MAYBE_StreamFailBeforeReadIsExecutedOnNetworkThread \
536 DISABLED_StreamFailBeforeReadIsExecutedOnNetworkThread
537 #else
538 #define MAYBE_StreamFailBeforeReadIsExecutedOnNetworkThread \
539 StreamFailBeforeReadIsExecutedOnNetworkThread
540 #endif
541
542 TEST_P(BidirectionalStreamTest,
543 MAYBE_StreamFailBeforeReadIsExecutedOnNetworkThread) {
534 class CustomTestBidirectionalStreamCallback 544 class CustomTestBidirectionalStreamCallback
535 : public TestBidirectionalStreamCallback { 545 : public TestBidirectionalStreamCallback {
536 bool MaybeCancel(bidirectional_stream* stream, ResponseStep step) override { 546 bool MaybeCancel(bidirectional_stream* stream, ResponseStep step) override {
537 if (step == ResponseStep::ON_READ_COMPLETED) { 547 if (step == ResponseStep::ON_READ_COMPLETED) {
538 // Shut down the server, and the stream should error out. 548 // Shut down the server, and the stream should error out.
539 // The second call to ShutdownQuicTestServer is no-op. 549 // The second call to ShutdownQuicTestServer is no-op.
540 ShutdownQuicTestServer(); 550 ShutdownQuicTestServer();
541 } 551 }
542 return TestBidirectionalStreamCallback::MaybeCancel(stream, step); 552 return TestBidirectionalStreamCallback::MaybeCancel(stream, step);
543 } 553 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 ASSERT_EQ(TestBidirectionalStreamCallback::ON_FAILED, test.response_step); 657 ASSERT_EQ(TestBidirectionalStreamCallback::ON_FAILED, test.response_step);
648 ASSERT_EQ(net::ERR_NAME_NOT_RESOLVED, test.net_error); 658 ASSERT_EQ(net::ERR_NAME_NOT_RESOLVED, test.net_error);
649 bidirectional_stream_destroy(test.stream); 659 bidirectional_stream_destroy(test.stream);
650 } 660 }
651 661
652 INSTANTIATE_TEST_CASE_P(BidirectionalStreamDelayRequestHeadersUntilFlush, 662 INSTANTIATE_TEST_CASE_P(BidirectionalStreamDelayRequestHeadersUntilFlush,
653 BidirectionalStreamTest, 663 BidirectionalStreamTest,
654 ::testing::Values(true, false)); 664 ::testing::Values(true, false));
655 665
656 } // namespace grpc_support 666 } // namespace grpc_support
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698