Skip to content

Commit 3fac0a8

Browse files
committed
test: Replace println! with debug!
So that github action result loading will be faster.
1 parent ebcab80 commit 3fac0a8

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

src/tests/test_async.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async fn test_basic_bounded_1_thread<T: AsyncTxTrait<i32>, R: AsyncRxTrait<i32>>
8282
for i in 0i32..12 {
8383
match rx.recv().await {
8484
Ok(j) => {
85-
println!("recv {}", i);
85+
debug!("recv {}", i);
8686
assert_eq!(i, j);
8787
}
8888
Err(e) => {
@@ -92,7 +92,7 @@ async fn test_basic_bounded_1_thread<T: AsyncTxTrait<i32>, R: AsyncRxTrait<i32>>
9292
}
9393
let res = rx.recv().await;
9494
assert!(res.is_err());
95-
println!("rx close");
95+
debug!("rx close");
9696
let _ = noti_tx.send(true);
9797
});
9898
assert!(tx.send(10).await.is_ok());
@@ -125,7 +125,7 @@ async fn test_basic_unbounded_1_thread<T: BlockingTxTrait<i32>, R: AsyncRxTrait<
125125
for i in 0i32..12 {
126126
match rx.recv().await {
127127
Ok(j) => {
128-
println!("recv {}", i);
128+
debug!("recv {}", i);
129129
assert_eq!(i, j);
130130
}
131131
Err(e) => {
@@ -135,7 +135,7 @@ async fn test_basic_unbounded_1_thread<T: BlockingTxTrait<i32>, R: AsyncRxTrait<
135135
}
136136
let res = rx.recv().await;
137137
assert!(res.is_err());
138-
println!("rx close");
138+
debug!("rx close");
139139
let _ = noti_tx.send(true);
140140
});
141141
assert!(tx.send(10).is_ok());
@@ -433,7 +433,7 @@ async fn test_presure_bounded_async_multi(
433433
}
434434
}
435435
let _ = _noti_tx.send(_rx_i).await;
436-
//println!("rx {} exit", _rx_i);
436+
//debug!("rx {} exit", _rx_i);
437437
});
438438
}
439439
drop(tx);

src/tests/test_async_blocking.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ fn test_presure_1_tx_async_1_rx_blocking<T: AsyncTxTrait<usize>, R: BlockingRxTr
133133
match rx.recv() {
134134
Ok(_) => {
135135
_counter.as_ref().fetch_add(1, Ordering::SeqCst);
136-
//print!("{} {}\r", _rx_i, i);
136+
//debug!("{} {}\r", _rx_i, i);
137137
}
138138
Err(_) => break 'A,
139139
}
140140
}
141-
println!("rx exit");
141+
debug!("rx exit");
142142
});
143143
let rt = get_runtime();
144144
rt.block_on(async move {
@@ -148,7 +148,7 @@ fn test_presure_1_tx_async_1_rx_blocking<T: AsyncTxTrait<usize>, R: BlockingRxTr
148148
_ => {}
149149
}
150150
}
151-
println!("tx exit");
151+
debug!("tx exit");
152152
});
153153
let _ = th.join();
154154
assert_eq!(counter.as_ref().load(Ordering::Acquire), round);
@@ -178,12 +178,12 @@ fn test_presure_multi_tx_async_1_rx_blocking<R: BlockingRxTrait<usize>>(
178178
match rx.recv() {
179179
Ok(_) => {
180180
_counter.as_ref().fetch_add(1, Ordering::SeqCst);
181-
//print!("{} {}\r", _rx_i, i);
181+
//debug!("{} {}\r", _rx_i, i);
182182
}
183183
Err(_) => break 'A,
184184
}
185185
}
186-
println!("rx exit");
186+
debug!("rx exit");
187187
});
188188
let rt = get_runtime();
189189
rt.block_on(async move {
@@ -199,7 +199,7 @@ fn test_presure_multi_tx_async_1_rx_blocking<R: BlockingRxTrait<usize>>(
199199
}
200200
}
201201
let _ = _noti_tx.send(_tx_i).await;
202-
println!("tx {} exit", _tx_i);
202+
debug!("tx {} exit", _tx_i);
203203
});
204204
}
205205
drop(tx);
@@ -239,12 +239,12 @@ fn test_presure_multi_tx_async_multi_rx_blocking(
239239
match _rx.recv() {
240240
Ok(_) => {
241241
_counter.as_ref().fetch_add(1, Ordering::SeqCst);
242-
//print!("{} {}\r", _rx_i, i);
242+
//debug!("{} {}\r", _rx_i, i);
243243
}
244244
Err(_) => break 'A,
245245
}
246246
}
247-
println!("rx {} exit", _rx_i);
247+
debug!("rx {} exit", _rx_i);
248248
}));
249249
}
250250
drop(rx);
@@ -262,7 +262,7 @@ fn test_presure_multi_tx_async_multi_rx_blocking(
262262
}
263263
}
264264
let _ = _noti_tx.send(_tx_i).await;
265-
println!("tx {} exit", _tx_i);
265+
debug!("tx {} exit", _tx_i);
266266
});
267267
}
268268
drop(tx);

src/tests/test_blocking_async.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async fn test_basic_1_tx_blocking_1_rx_async<T: BlockingTxTrait<usize>, R: Async
3838
for i in 0usize..12 {
3939
match rx.recv().await {
4040
Ok(j) => {
41-
println!("recv {}", i);
41+
debug!("recv {}", i);
4242
assert_eq!(i, j);
4343
}
4444
Err(e) => {
@@ -48,7 +48,7 @@ async fn test_basic_1_tx_blocking_1_rx_async<T: BlockingTxTrait<usize>, R: Async
4848
}
4949
let res = rx.recv().await;
5050
assert!(res.is_err());
51-
println!("rx close");
51+
debug!("rx close");
5252
let _ = th.join();
5353
}
5454

@@ -134,7 +134,7 @@ async fn test_presure_tx_multi_blocking_1_rx_async<R: AsyncRxTrait<usize>>(
134134
match _tx.send(i) {
135135
Err(e) => panic!("{}", e),
136136
_ => {
137-
//println!("tx {} {}", _tx_i, i);
137+
//debug!("tx {} {}", _tx_i, i);
138138
}
139139
}
140140
}
@@ -147,7 +147,7 @@ async fn test_presure_tx_multi_blocking_1_rx_async<R: AsyncRxTrait<usize>>(
147147
match rx.recv().await {
148148
Ok(_i) => {
149149
_counter.as_ref().fetch_add(1, Ordering::SeqCst);
150-
//println!("rx {} {}\r", _rx_i, _i);
150+
//debug!("rx {} {}\r", _rx_i, _i);
151151
}
152152
Err(_) => break 'A,
153153
}
@@ -205,7 +205,7 @@ async fn test_presure_tx_multi_blocking_multi_rx_async(
205205
}
206206
}
207207
}
208-
println!("tx {} exit", _tx_i);
208+
debug!("tx {} exit", _tx_i);
209209
}));
210210
}
211211
drop(tx);
@@ -224,9 +224,9 @@ async fn test_presure_tx_multi_blocking_multi_rx_async(
224224
Err(_) => break 'A,
225225
}
226226
}
227-
println!("rx {} exiting", _rx_i);
227+
debug!("rx {} exiting", _rx_i);
228228
let _ = _noti_tx.send(_rx_i).await;
229-
println!("rx {} exit", _rx_i);
229+
debug!("rx {} exit", _rx_i);
230230
});
231231
}
232232
drop(rx);

0 commit comments

Comments
 (0)