Skip to content

Commit

Permalink
fix tests on other archs
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Dec 16, 2023
1 parent aa9839d commit d12d34f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tokio/tests/coop_budget.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![warn(rust_2018_idioms)]
#![cfg(all(feature = "full", target_os = "linux"))]

use std::sync::atomic::{AtomicU64, Ordering};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use tokio::net::UdpSocket;

Expand All @@ -23,8 +23,8 @@ use tokio::net::UdpSocket;
/// and there are two budget events per packet, a send and a recv.
#[tokio::test]
async fn coop_budget_udp_send_recv() {
const BUDGET: u64 = 128;
const N_ITERATIONS: u64 = 1024;
const BUDGET: usize = 128;
const N_ITERATIONS: usize = 1024;

const PACKET: &[u8] = b"Hello, world";
const PACKET_LEN: usize = 12;
Expand All @@ -42,7 +42,7 @@ async fn coop_budget_udp_send_recv() {
tx.connect(rx.local_addr().unwrap()).await.unwrap();
rx.connect(tx.local_addr().unwrap()).await.unwrap();

let tracker = Arc::new(AtomicU64::default());
let tracker = Arc::new(AtomicUsize::default());

let tracker_clone = Arc::clone(&tracker);

Expand Down

0 comments on commit d12d34f

Please sign in to comment.