[WifiTetheringTest] Increased the file download size

Bug: 67712244
Test: Verified the changes
Change-Id: I4763f961be58ed1920762091aa3ed4117051330b
diff --git a/acts/tests/google/wifi/WifiTetheringTest.py b/acts/tests/google/wifi/WifiTetheringTest.py
index 57a8e66..ef79f3d 100644
--- a/acts/tests/google/wifi/WifiTetheringTest.py
+++ b/acts/tests/google/wifi/WifiTetheringTest.py
@@ -44,7 +44,7 @@
 
         self.convert_byte_to_mb = 1024.0 * 1024.0
         self.new_ssid = "wifi_tethering_test2"
-        self.data_usage_error = 0.3
+        self.data_usage_error = 1
 
         self.hotspot_device = self.android_devices[0]
         self.tethered_devices = self.android_devices[1:]
@@ -89,6 +89,8 @@
     def on_fail(self, test_name, begin_time):
         """ Collect bug report on failure """
         self.hotspot_device.take_bug_report(test_name, begin_time)
+        for ad in self.tethered_devices:
+            ad.take_bug_report(test_name, begin_time)
 
     """ Helper functions """
 
@@ -143,6 +145,7 @@
         """
         default_route_substr = "::/0 -> "
         link_properties = dut.droid.connectivityGetActiveLinkProperties()
+        self.log.info("LINK PROPERTIES:\n%s\n" % link_properties)
         return link_properties and default_route_substr in link_properties
 
     def _verify_ipv6_tethering(self, dut):
@@ -182,6 +185,8 @@
         for _ in range(50):
             dut_id = random.randint(0, len(self.tethered_devices)-1)
             dut = self.tethered_devices[dut_id]
+            # wait for 1 sec between connect & disconnect stress test
+            time.sleep(1)
             if device_connected[dut_id]:
                 wutils.wifi_forget_network(dut, self.network["SSID"])
             else:
@@ -271,12 +276,12 @@
 
         Steps:
             1. Start wifi tethering on hotspot device
-            2. Verify IPv6 address on hotspot device
+            2. Verify IPv6 address on hotspot device (VZW & TMO only)
             3. Connect tethered device to hotspot device
-            4. Verify IPv6 address on the client's link properties
-            5. Verify ping on client using ping6 which should pass
+            4. Verify IPv6 address on the client's link properties (VZW only)
+            5. Verify ping on client using ping6 which should pass (VZW only)
             6. Disable mobile data on provider and verify that link properties
-               does not have IPv6 address and default route
+               does not have IPv6 address and default route (VZW only)
         """
         # Start wifi tethering on the hotspot device
         wutils.toggle_wifi_off_and_on(self.hotspot_device)
@@ -320,14 +325,15 @@
 
         result = self._find_ipv6_default_route(self.tethered_devices[0])
         self.hotspot_device.droid.telephonyToggleDataConnection(True)
-        if not result:
+        if result:
             asserts.fail("Found IPv6 default route in link properties:Data off")
+        self.log.info("Did not find IPv6 address in link properties")
 
         # Disable wifi tethering
         wutils.stop_wifi_tethering(self.hotspot_device)
 
     @test_tracker_info(uuid="110b61d1-8af2-4589-8413-11beac7a3025")
-    def test_wifi_tethering_2ghz_traffic_between_2tethered_devices(self):
+    def wifi_tethering_2ghz_traffic_between_2tethered_devices(self):
         """ Steps:
 
             1. Start wifi hotspot with 2G band
@@ -341,7 +347,7 @@
         wutils.stop_wifi_tethering(self.hotspot_device)
 
     @test_tracker_info(uuid="953f6e2e-27bd-4b73-85a6-d2eaa4e755d5")
-    def test_wifi_tethering_5ghz_traffic_between_2tethered_devices(self):
+    def wifi_tethering_5ghz_traffic_between_2tethered_devices(self):
         """ Steps:
 
             1. Start wifi hotspot with 5ghz band
@@ -435,7 +441,8 @@
         end_time = int(time.time() * 1000)
         bytes_before_download = dut.droid.connectivityGetRxBytesForDevice(
             subscriber_id, 0, end_time)
-        self.log.info("Bytes before download %s" % bytes_before_download)
+        self.log.info("Data usage before download: %s MB" %
+                      (bytes_before_download/self.convert_byte_to_mb))
 
         # download file
         self.log.info("Download file of size %sMB" % self.file_size)
@@ -446,7 +453,8 @@
         end_time = int(time.time() * 1000)
         bytes_after_download = dut.droid.connectivityGetRxBytesForDevice(
             subscriber_id, 0, end_time)
-        self.log.info("Bytes after download %s" % bytes_after_download)
+        self.log.info("Data usage after download: %s MB" %
+                      (bytes_after_download/self.convert_byte_to_mb))
 
         bytes_diff = bytes_after_download - bytes_before_download
         wutils.stop_wifi_tethering(self.hotspot_device)
@@ -461,9 +469,9 @@
     def test_wifi_tethering_data_usage_limit(self):
         """ Steps:
 
-            1. Set the data usage limit to current data usage + 2MB
+            1. Set the data usage limit to current data usage + 10MB
             2. Start wifi tethering and connect a dut to the SSID
-            3. Download 5MB data on tethered device
+            3. Download 20MB data on tethered device
                a. file download should stop
                b. tethered device will lose internet connectivity
                c. data usage limit reached message should be displayed
@@ -472,7 +480,7 @@
         """
         wutils.toggle_wifi_off_and_on(self.hotspot_device)
         dut = self.hotspot_device
-        data_usage_2mb = 2 * self.convert_byte_to_mb
+        data_usage_inc = 10 * self.convert_byte_to_mb
         subscriber_id = dut.droid.telephonyGetSubscriberId()
 
         self._start_wifi_tethering()
@@ -483,11 +491,11 @@
         old_data_usage = dut.droid.connectivityQuerySummaryForDevice(
             subscriber_id, 0, end_time)
 
-        # set data usage limit to current usage limit + 2MB
+        # set data usage limit to current usage limit + 10MB
         dut.droid.connectivitySetDataUsageLimit(
-            subscriber_id, str(int(old_data_usage + data_usage_2mb)))
+            subscriber_id, str(int(old_data_usage + data_usage_inc)))
 
-        # download file - size 5MB
+        # download file - size 20MB
         http_file_download_by_chrome(self.tethered_devices[0],
                                      self.download_file,
                                      timeout=120)
@@ -503,8 +511,10 @@
         dut.droid.connectivityFactoryResetNetworkPolicies(subscriber_id)
         wutils.stop_wifi_tethering(self.hotspot_device)
 
-        old_data_usage = (old_data_usage+data_usage_2mb)/self.convert_byte_to_mb
+        old_data_usage = (old_data_usage+data_usage_inc)/self.convert_byte_to_mb
         new_data_usage = new_data_usage/self.convert_byte_to_mb
+        self.log.info("Expected data usage: %s MB" % old_data_usage)
+        self.log.info("Actual data usage: %s MB" % new_data_usage)
 
         return (new_data_usage-old_data_usage) < self.data_usage_error