Tweaks to test timing to avoid errors on test VMs

This commit is contained in:
Daniele Varrazzo 2011-02-20 19:33:22 +00:00
parent d74f777339
commit a97e2a842d

View File

@ -129,7 +129,7 @@ conn.close()
self.autocommit(self.conn)
self.listen('foo')
self.notify('foo').communicate()
time.sleep(0.1)
time.sleep(0.5)
self.conn.poll()
notify = self.conn.notifies[0]
self.assert_(isinstance(notify, psycopg2.extensions.Notify))
@ -138,7 +138,7 @@ conn.close()
self.autocommit(self.conn)
self.listen('foo')
pid = int(self.notify('foo').communicate()[0])
time.sleep(0.1)
time.sleep(0.5)
self.conn.poll()
self.assertEqual(1, len(self.conn.notifies))
notify = self.conn.notifies[0]
@ -153,7 +153,7 @@ conn.close()
self.autocommit(self.conn)
self.listen('foo')
pid = int(self.notify('foo', payload="Hello, world!").communicate()[0])
time.sleep(0.1)
time.sleep(0.5)
self.conn.poll()
self.assertEqual(1, len(self.conn.notifies))
notify = self.conn.notifies[0]