Skip to content

Commit 747b179

Browse files
committed
Fix typos in cancel safety unit tests
1 parent fb22803 commit 747b179

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

application/apps/indexer/processor/src/producer/tests/cancel_safety.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async fn cancel_safe_no_errors() {
4747
let mut producer = MessageProducer::new(parser, source);
4848
let (cancel_tx, mut cancel_rx) = tokio::sync::mpsc::channel(32);
4949

50-
let cancel_handel = tokio::spawn(async move {
50+
let cancel_handle = tokio::spawn(async move {
5151
let mut count = 0;
5252
while cancel_tx.send(()).await.is_ok() {
5353
sleep(Duration::from_millis(2)).await;
@@ -107,7 +107,7 @@ async fn cancel_safe_no_errors() {
107107

108108
assert!(cancel_received > 50);
109109

110-
assert!(cancel_handel.await.is_ok());
110+
assert!(cancel_handle.await.is_ok());
111111
}
112112

113113
/// Cancel safety test for producer session with parse incomplete errors.
@@ -155,7 +155,7 @@ async fn cancel_safe_incomplete() {
155155
let mut producer = MessageProducer::new(parser, source);
156156
let (cancel_tx, mut cancel_rx) = tokio::sync::mpsc::channel(32);
157157

158-
let cancel_handel = tokio::spawn(async move {
158+
let cancel_handle = tokio::spawn(async move {
159159
let mut count = 0;
160160
while cancel_tx.send(()).await.is_ok() {
161161
sleep(Duration::from_millis(2)).await;
@@ -215,7 +215,7 @@ async fn cancel_safe_incomplete() {
215215

216216
assert!(cancel_received > 50);
217217

218-
assert!(cancel_handel.await.is_ok());
218+
assert!(cancel_handle.await.is_ok());
219219
}
220220

221221
/// Cancel safety test for producer session with parse end of file error.
@@ -256,7 +256,7 @@ async fn cancel_safe_eof() {
256256
let mut producer = MessageProducer::new(parser, source);
257257
let (cancel_tx, mut cancel_rx) = tokio::sync::mpsc::channel(32);
258258

259-
let cancel_handel = tokio::spawn(async move {
259+
let cancel_handle = tokio::spawn(async move {
260260
let mut count = 0;
261261
while cancel_tx.send(()).await.is_ok() {
262262
sleep(Duration::from_millis(2)).await;
@@ -316,7 +316,7 @@ async fn cancel_safe_eof() {
316316

317317
assert!(cancel_received > 50);
318318

319-
assert!(cancel_handel.await.is_ok());
319+
assert!(cancel_handle.await.is_ok());
320320
}
321321

322322
/// Cancel safety test for producer session with parse errors, without calling load
@@ -359,7 +359,7 @@ async fn cancel_safe_parse_err_no_load() {
359359
let mut producer = MessageProducer::new(parser, source);
360360
let (cancel_tx, mut cancel_rx) = tokio::sync::mpsc::channel(32);
361361

362-
let cancel_handel = tokio::spawn(async move {
362+
let cancel_handle = tokio::spawn(async move {
363363
let mut count = 0;
364364
while cancel_tx.send(()).await.is_ok() {
365365
sleep(Duration::from_millis(2)).await;
@@ -419,7 +419,7 @@ async fn cancel_safe_parse_err_no_load() {
419419

420420
assert!(cancel_received > 50);
421421

422-
assert!(cancel_handel.await.is_ok());
422+
assert!(cancel_handle.await.is_ok());
423423
}
424424

425425
/// Cancel safety test for producer session with parse errors, causing to call load
@@ -470,7 +470,7 @@ async fn cancel_safe_parse_err_with_load() {
470470
let mut producer = MessageProducer::new(parser, source);
471471
let (cancel_tx, mut cancel_rx) = tokio::sync::mpsc::channel(32);
472472

473-
let cancel_handel = tokio::spawn(async move {
473+
let cancel_handle = tokio::spawn(async move {
474474
let mut count = 0;
475475
while cancel_tx.send(()).await.is_ok() {
476476
sleep(Duration::from_millis(2)).await;
@@ -530,7 +530,7 @@ async fn cancel_safe_parse_err_with_load() {
530530

531531
assert!(cancel_received > 50);
532532

533-
assert!(cancel_handel.await.is_ok());
533+
assert!(cancel_handle.await.is_ok());
534534
}
535535

536536
/// Cancel safety test use no errors using `timeout()` method instead of `select!{}` macro.

application/apps/indexer/processor/src/producer/tests/mock_byte_source.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ async fn test_load_cancel_safety() {
268268

269269
let (cancel_tx, mut cancel_rx) = tokio::sync::mpsc::channel(32);
270270

271-
let cancel_handel = tokio::spawn(async move {
271+
let cancel_handle = tokio::spawn(async move {
272272
let mut count = 0;
273273
while cancel_tx.send(()).await.is_ok() {
274274
sleep(Duration::from_millis(2)).await;
@@ -305,5 +305,5 @@ async fn test_load_cancel_safety() {
305305

306306
assert!(cancel_received > 20);
307307

308-
assert!(cancel_handel.await.is_ok());
308+
assert!(cancel_handle.await.is_ok());
309309
}

0 commit comments

Comments
 (0)