Skip to content

Commit 690dcf7

Browse files
committed
modify where task is created / ran
1 parent ff0d5dc commit 690dcf7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/asynchronous/test_mongos_load_balancing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def run(self):
5555

5656
class SimpleOp:
5757
def __init__(self, client):
58-
self.task = asyncio.create_task(self.run())
58+
self.task: asyncio.Task
5959
self.client = client
6060
self.passed = False
6161

@@ -64,7 +64,7 @@ async def run(self):
6464
self.passed = True # No exception raised.
6565

6666
def start(self):
67-
pass
67+
self.task = asyncio.create_task(self.run())
6868

6969
async def join(self):
7070
await self.task

test/test_mongos_load_balancing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def run(self):
5555

5656
class SimpleOp:
5757
def __init__(self, client):
58-
self.task = asyncio.create_task(self.run())
58+
self.task: asyncio.Task
5959
self.client = client
6060
self.passed = False
6161

@@ -64,7 +64,7 @@ def run(self):
6464
self.passed = True # No exception raised.
6565

6666
def start(self):
67-
pass
67+
self.task = asyncio.create_task(self.run())
6868

6969
def join(self):
7070
self.task

0 commit comments

Comments
 (0)