@@ -95,7 +95,7 @@ fn test_none_sink_id() {
95
95
} ) ;
96
96
97
97
// give event thread some time to pick up events
98
- std:: thread:: sleep ( Duration :: from_millis ( 5 ) ) ;
98
+ std:: thread:: sleep ( Duration :: from_millis ( 50 ) ) ;
99
99
assert_eq ! ( state_changes. load( Ordering :: Relaxed ) , 1 ) ; // started
100
100
101
101
// changing sink_id to 'none' again should make no changes
@@ -110,22 +110,22 @@ fn test_none_sink_id() {
110
110
assert_eq ! ( context. state( ) , AudioContextState :: Suspended ) ;
111
111
112
112
// give event thread some time to pick up events
113
- std:: thread:: sleep ( Duration :: from_millis ( 5 ) ) ;
113
+ std:: thread:: sleep ( Duration :: from_millis ( 50 ) ) ;
114
114
assert_eq ! ( state_changes. load( Ordering :: Relaxed ) , 2 ) ; // suspended
115
115
116
116
context. resume_sync ( ) ;
117
117
assert_eq ! ( context. state( ) , AudioContextState :: Running ) ;
118
118
119
119
// give event thread some time to pick up events
120
- std:: thread:: sleep ( Duration :: from_millis ( 5 ) ) ;
120
+ std:: thread:: sleep ( Duration :: from_millis ( 50 ) ) ;
121
121
assert_eq ! ( state_changes. load( Ordering :: Relaxed ) , 3 ) ; // resumed
122
122
123
123
context. close_sync ( ) ;
124
124
assert_eq ! ( context. state( ) , AudioContextState :: Closed ) ;
125
125
assert ! ( sink_stable. load( Ordering :: SeqCst ) ) ;
126
126
127
127
// give event thread some time to pick up events
128
- std:: thread:: sleep ( Duration :: from_millis ( 5 ) ) ;
128
+ std:: thread:: sleep ( Duration :: from_millis ( 50 ) ) ;
129
129
assert_eq ! ( state_changes. load( Ordering :: Relaxed ) , 4 ) ; // closed
130
130
}
131
131
0 commit comments