Skip to content

Commit

Permalink
[fuchsia] Enable UDPSocketTest.JoinMulticastGroup
Browse files Browse the repository at this point in the history
Assert after each send call to better pinpoint future problems.

The test passes locally.

Fixed: 1125855
Change-Id: I30d5c7bd2bc14fbd9547b1eb6d309d7556274891
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2404483
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Tamir Duberstein <tamird@google.com>
Cr-Commit-Position: refs/heads/master@{#806111}
  • Loading branch information
tamird authored and Commit Bot committed Sep 11, 2020
1 parent 220f201 commit 1bef850
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 7 additions & 4 deletions services/network/udp_socket_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,7 @@ TEST_F(UDPSocketTest, MAYBE_JoinMulticastGroup) {
mojom::UDPSocketOptionsPtr options = mojom::UDPSocketOptions::New();
options->allow_address_sharing_for_multicast = true;

net::IPAddress bind_ip_address;
EXPECT_TRUE(bind_ip_address.AssignFromIPLiteral("0.0.0.0"));
net::IPAddress bind_ip_address = net::IPAddress::AllZeros(group_ip.size());
net::IPEndPoint socket_address(bind_ip_address, 0);
ASSERT_EQ(net::OK, helper.BindSync(socket_address, std::move(options),
&socket_address));
Expand Down Expand Up @@ -741,10 +740,14 @@ TEST_F(UDPSocketTest, MAYBE_JoinMulticastGroup) {

// No longer can receive messages from itself or from second socket.
EXPECT_EQ(net::OK, helper.SendToSync(group_alias, test_msg));
ASSERT_EQ(net::OK, second_socket_helper.SendToSync(group_alias, test_msg));
socket_remote->ReceiveMore(1);
socket_remote.FlushForTesting();
ASSERT_EQ(2u, listener.results().size());
EXPECT_EQ(2u, listener.results().size());

EXPECT_EQ(net::OK, second_socket_helper.SendToSync(group_alias, test_msg));
socket_remote->ReceiveMore(1);
socket_remote.FlushForTesting();
EXPECT_EQ(2u, listener.results().size());
}

TEST_F(UDPSocketTest, ErrorHappensDuringSocketOptionsConfiguration) {
Expand Down
3 changes: 0 additions & 3 deletions testing/buildbot/filters/fuchsia.services_unittests.filter
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# https://crbug.com/1125854 - IsTracingEnabled() expectations not met.
-TracingConsumerTest.NotifiesOnTracingEnabledWaitsFor*

# https://crbug.com/1125855 - Second socket receives too many packets.
-UDPSocketTest.JoinMulticastGroup

0 comments on commit 1bef850

Please sign in to comment.