Move fail in testFirewallBlocking

testFirewallBlocking is flaky and failure was that pkt is expected to be
dropped but pkt was not dropped.
Root cause of this failure was not found out and possible next actions
were discussed in b/276496378.

Currently, test expect DatagramSocket.send throws exception when pkt is
expected to be dropped and test fail just after send does not throw.
This CL moves fail after pkt is received for future investigation.

Bug: 276496378
Test: atest ConnectivityManagerTest
Change-Id: Ife8b0da13843e56b9d5465d8d0464d0ae396246c
diff --git a/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java b/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
index d6d384b..8786638 100644
--- a/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
+++ b/tests/cts/net/src/android/net/cts/ConnectivityManagerTest.java
@@ -3395,15 +3395,15 @@
                     + " uidFirewallRule=" + mCm.getUidFirewallRule(chain, Process.myUid()));
         }
 
+        dstSock.receive(pkt);
+        assertArrayEquals(sendData, pkt.getData());
+
         if (expectBlock) {
             fail("Expect to be blocked by firewall but sending packet was not blocked:"
                     + " chain=" + chain
                     + " chainEnabled=" + mCm.getFirewallChainEnabled(chain)
                     + " uidFirewallRule=" + mCm.getUidFirewallRule(chain, Process.myUid()));
         }
-
-        dstSock.receive(pkt);
-        assertArrayEquals(sendData, pkt.getData());
     }
 
     private static final boolean EXPECT_PASS = false;