Saggi Mizrahi has uploaded a new change for review.

Change subject: tests: Fix race in misc:DdWatchCopy.testStop
......................................................................

tests: Fix race in misc:DdWatchCopy.testStop

This doesn't actually fix the race but makes it less common by copying
large amounts of data (4G) we are more or less guranteed that the check
will run at least once before the copy is over.

I also change it so it copies to /dev/null so we don't run out of memory
on tmpfs in case the test fails.

Change-Id: I50e044ec2d949a95e52adcfbc0098a032fb7193d
Signed-off-by: Saggi Mizrahi <[email protected]>
---
M tests/miscTests.py
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/64/11564/1

diff --git a/tests/miscTests.py b/tests/miscTests.py
index 81b42ca..0a90c40 100644
--- a/tests/miscTests.py
+++ b/tests/miscTests.py
@@ -506,12 +506,12 @@
         Test that stop really stops the copying process.
         """
         try:
-            with tempfile.NamedTemporaryFile() as f:
-                ddWatchCopy("/dev/zero", f.name, lambda: True, 100)
+            ddWatchCopy("/dev/zero", "/dev/null",
+                        lambda: True, ((2 ** 30) * 4))
         except misc.se.ActionStopped:
-            self.log.info("Looks like stopped!")
+            self.log.info("Looks like it stopped!")
         else:
-            self.fail("Copying didn't stopped!")
+            self.fail("Copying didn't stopp!")
 
 
 class ValidateN(TestCaseBase):


--
To view, visit http://gerrit.ovirt.org/11564
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50e044ec2d949a95e52adcfbc0098a032fb7193d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to