File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 20
20
import functools
21
21
import sys
22
22
import threading
23
+ import time
23
24
from test .asynchronous .helpers import ConcurrentRunner
24
25
25
26
sys .path [0 :0 ] = ["" ]
@@ -752,6 +753,7 @@ async def insert_docs():
752
753
while not done :
753
754
await db .inventory .insert_one ({"username" : "alice" })
754
755
await db .inventory .delete_one ({"username" : "alice" })
756
+ await asyncio .sleep (0.005 )
755
757
756
758
t = ConcurrentRunner (target = insert_docs )
757
759
await t .start ()
Original file line number Diff line number Diff line change 20
20
import functools
21
21
import sys
22
22
import threading
23
+ import time
23
24
from test .helpers import ConcurrentRunner
24
25
25
26
sys .path [0 :0 ] = ["" ]
@@ -752,6 +753,7 @@ def insert_docs():
752
753
while not done :
753
754
db .inventory .insert_one ({"username" : "alice" })
754
755
db .inventory .delete_one ({"username" : "alice" })
756
+ time .sleep (0.005 )
755
757
756
758
t = ConcurrentRunner (target = insert_docs )
757
759
t .start ()
You can’t perform that action at this time.
0 commit comments