Skip to content

Instantly share code, notes, and snippets.

@bloodeagle40234
Created October 17, 2016 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bloodeagle40234/2098382d7157cf92cbca9a39907566fb to your computer and use it in GitHub Desktop.
Save bloodeagle40234/2098382d7157cf92cbca9a39907566fb to your computer and use it in GitHub Desktop.
diff --git a/test/unit/obj/test_ssync.py b/test/unit/obj/test_ssync.py
index e6ed662..38fb876 100644
--- a/test/unit/obj/test_ssync.py
+++ b/test/unit/obj/test_ssync.py
@@ -797,7 +797,11 @@ class TestSsyncECReconstructorSyncJob(TestBaseSsync):
log_lines[0])
self.assertFalse(log_lines[1:])
# trampoline for the receiver to write a log
- eventlet.sleep(0)
+ for x in range(2):
+ # In mitaka stable, we need more tranpoline to write a log because
+ # before commit 4c11833a9cbff499725365e535e217f3eae3c442, writing
+ # entier chunk is running in green thread.
+ eventlet.sleep(0)
log_lines = self.rx_logger.get_lines_for_level('warning')
self.assertIn('ssync subrequest failed with 499',
log_lines[0])
@@ -965,7 +969,11 @@ class TestSsyncECReconstructorSyncJob(TestBaseSsync):
self.assertFalse(
self.reconstructor.logger.get_lines_for_level('error'))
# trampoline for the receiver to write a log
- eventlet.sleep(0)
+ for x in range(2):
+ # In mitaka stable, we need more tranpoline to write a log because
+ # before commit 4c11833a9cbff499725365e535e217f3eae3c442, writing
+ # entier chunk is running in green thread.
+ eventlet.sleep(0)
self.assertFalse(self.rx_logger.get_lines_for_level('warning'))
self.assertFalse(self.rx_logger.get_lines_for_level('error'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment