@@ -101,7 +101,7 @@ async def sync_mirror(value: int) -> int:
101101 async def _ (mirrored_value : int ) -> None :
102102 if mirrored_value < INCREMENTS :
103103 return
104- await asyncio .sleep (0.1 )
104+ await asyncio .sleep (0.001 )
105105 store .dispatch (FinishAction ())
106106
107107 dispatch_actions (store )
@@ -124,7 +124,7 @@ async def _(values: tuple[int, int]) -> None:
124124 elif value < INCREMENTS :
125125 store .dispatch (IncrementAction ())
126126 else :
127- await asyncio .sleep (0.1 )
127+ await asyncio .sleep (0.001 )
128128 store .dispatch (FinishAction ())
129129
130130
@@ -139,6 +139,7 @@ async def sync_mirror(value: int) -> int:
139139 @store .autorun (lambda state : (state .value , state .mirrored_value ))
140140 async def _ (values : tuple [int , int ]) -> None :
141141 value , mirrored_value = values
142+ await asyncio .sleep (0.001 )
142143 if mirrored_value != value :
143144 sync_mirror_returned_value = sync_mirror ()
144145 assert 'awaited=False' in str (sync_mirror_returned_value )
@@ -148,7 +149,6 @@ async def _(values: tuple[int, int]) -> None:
148149 elif value < INCREMENTS :
149150 store .dispatch (IncrementAction ())
150151 else :
151- await asyncio .sleep (0.1 )
152152 store .dispatch (FinishAction ())
153153
154154
@@ -165,7 +165,7 @@ async def _(value: int) -> int:
165165 async def _ (mirrored_value : int ) -> None :
166166 if mirrored_value < INCREMENTS :
167167 return
168- await asyncio .sleep (0.1 )
168+ await asyncio .sleep (0.001 )
169169 store .dispatch (FinishAction ())
170170
171171 dispatch_actions (store )
@@ -184,7 +184,7 @@ async def _(value: int) -> None:
184184 assert await doubled () == value * 2
185185 for _ in range (10 ):
186186 await doubled ()
187- await asyncio .sleep (0.01 )
187+ await asyncio .sleep (0.001 )
188188 if value < INCREMENTS :
189189 store .dispatch (IncrementAction ())
190190 else :
@@ -209,7 +209,7 @@ async def _(value: int) -> None:
209209 calls_length = len (calls )
210210 assert await doubled () == value * 2
211211 assert len (calls ) == calls_length + 1
212- await asyncio .sleep (0.01 )
212+ await asyncio .sleep (0.001 )
213213
214214 if value < INCREMENTS :
215215 store .dispatch (IncrementAction ())
@@ -230,7 +230,7 @@ async def multiplied(value: int, factor: int) -> int:
230230 async def _ (value : int ) -> None :
231231 assert await multiplied (factor = 2 ) == value * 2
232232 assert await multiplied (factor = 3 ) == value * 3
233- await asyncio .sleep (0.01 )
233+ await asyncio .sleep (0.001 )
234234 if value < INCREMENTS :
235235 store .dispatch (IncrementAction ())
236236 else :
@@ -251,7 +251,7 @@ async def doubled(value: int) -> int:
251251 @store .autorun (lambda state : state .value )
252252 async def _ (value : int ) -> None :
253253 assert await doubled () == value * 2
254- await asyncio .sleep (0.01 )
254+ await asyncio .sleep (0.001 )
255255 if value < INCREMENTS :
256256 store .dispatch (IncrementAction ())
257257 else :
@@ -265,7 +265,7 @@ def test_subscription(store: StoreType) -> None:
265265 async def render (state : StateType ) -> None :
266266 if state .value == INCREMENTS :
267267 unsubscribe ()
268- await asyncio .sleep (0.1 )
268+ await asyncio .sleep (0.001 )
269269 store .dispatch (FinishAction ())
270270
271271 unsubscribe = store ._subscribe (render ) # noqa: SLF001
@@ -277,7 +277,7 @@ def test_event_subscription(store: StoreType) -> None:
277277 async def handler (event : IncrementEvent ) -> None :
278278 if event .post_value == INCREMENTS :
279279 unsubscribe ()
280- await asyncio .sleep (0.1 )
280+ await asyncio .sleep (0.001 )
281281 store .dispatch (FinishAction ())
282282
283283 unsubscribe = store .subscribe_event (IncrementEvent , handler )
0 commit comments