From 7c5d8b6fc1bf85ea0085029633c020a32dcd51f6 Mon Sep 17 00:00:00 2001 From: "A. Jesse Jiryu Davis" Date: Mon, 20 Oct 2014 09:00:31 -0400 Subject: [PATCH] Delete two unreliable master-slave tests. These tests were guaranteed to fail occasionally, but they didn't test a driver feature anyway. --- test/test_master_slave_connection.py | 30 ---------------------------- 1 file changed, 30 deletions(-) diff --git a/test/test_master_slave_connection.py b/test/test_master_slave_connection.py index 45d6c9575..83cfbea86 100644 --- a/test/test_master_slave_connection.py +++ b/test/test_master_slave_connection.py @@ -338,36 +338,6 @@ class TestMasterSlaveConnection(unittest.TestCase, TestRequestMixin): self.assertRaises(OperationFailure, self.db.test.save, {'username': 'mike'}) - # NOTE this test is non-deterministic, but I expect - # some failures unless the db is pulling instantaneously... - def test_insert_find_one_with_slaves(self): - count = 0 - for i in range(100): - self.db.test.remove({}) - self.db.test.insert({"x": i}) - try: - if i != self.db.test.find_one()["x"]: - count += 1 - except: - count += 1 - self.assertTrue(count) - - # NOTE this test is non-deterministic, but hopefully we pause long enough - # for the slaves to pull... - def test_insert_find_one_with_pause(self): - count = 0 - - self.db.test.remove({}) - self.db.test.insert({"x": 5586}) - time.sleep(11) - for _ in range(10): - try: - if 5586 != self.db.test.find_one()["x"]: - count += 1 - except: - count += 1 - self.assertFalse(count) - def test_kill_cursor_explicit(self): c = self.client c.read_preference = ReadPreference.SECONDARY_PREFERRED