Add wifi long traffic test for upload
CHERRY PICKED FROM AOSP
Bug: 79666070
Test: local
Change-Id: I59799f97dd13e294b7a1e6552f4b2beea07c1f30
Merged-In: I59799f97dd13e294b7a1e6552f4b2beea07c1f30
diff --git a/acts/tests/google/wifi/WifiStressTest.py b/acts/tests/google/wifi/WifiStressTest.py
index 1cacf45..d4d617f 100755
--- a/acts/tests/google/wifi/WifiStressTest.py
+++ b/acts/tests/google/wifi/WifiStressTest.py
@@ -331,7 +331,8 @@
Steps:
1. Scan and connect to a network.
2. Run IPerf to download data for few hours.
- 3. Verify no WiFi disconnects/data interruption.
+ 3. Run IPerf to upload data for few hours.
+ 4. Verify no WiFi disconnects/data interruption.
"""
try:
@@ -348,6 +349,15 @@
self.log.debug("Error occurred in iPerf traffic.")
start_time = time.time()
self.run_ping(sec)
+ # Start IPerf traffic from phone to server.
+ # Upload data for 5 hours.
+ args = "-p {} -t {}".format(self.iperf_server.port, sec)
+ self.log.info("Running iperf client {}".format(args))
+ result, data = self.dut.run_iperf_client(self.iperf_server_address,
+ args, timeout=sec+1)
+ if not result:
+ self.log.debug("Error occurred in iPerf traffic.")
+ self.run_ping(sec)
except:
total_time = time.time() - start_time
raise signals.TestFailure("Network long-connect failed."