Skip to content

Commit cd484fb

Browse files
committed
Formatting and run on Windows only
1 parent 58e3d8f commit cd484fb

2 files changed

Lines changed: 11 additions & 17 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ jobs:
4747
strategy:
4848
matrix:
4949
platform:
50-
- { target: aarch64-apple-darwin, os: macos-14 }
51-
- { target: x86_64-apple-darwin, os: macos-15-intel }
52-
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
5350
- { target: x86_64-pc-windows-msvc, os: windows-latest }
5451
- { target: i686-pc-windows-msvc, os: windows-latest }
55-
features: ["", "force-inprocess", "async"]
52+
features: ["", "async"]
5653
steps:
5754
- uses: actions/checkout@v4
5855

src/platform/test.rs

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,11 +1233,9 @@ fn stress_concurrent_senders_many_threads() {
12331233
thread::spawn(move || {
12341234
for msg_index in 0..messages_per_sender {
12351235
// Deterministic pseudo-random size per (sender, msg) pair.
1236-
let size = ((msg_index * 99991 + sender_id as usize * 90001) % max_msg_size)
1237-
.max(1);
1238-
let data: Vec<u8> = (0..size)
1239-
.map(|j| (j % 251) as u8 ^ sender_id)
1240-
.collect();
1236+
let size =
1237+
((msg_index * 99991 + sender_id as usize * 90001) % max_msg_size).max(1);
1238+
let data: Vec<u8> = (0..size).map(|j| (j % 251) as u8 ^ sender_id).collect();
12411239
tx.send(&data, vec![], vec![]).unwrap();
12421240
}
12431241
})
@@ -1349,7 +1347,10 @@ fn stress_receiver_set_churn() {
13491347
sender_stop.store(true, Ordering::Relaxed);
13501348
}
13511349

1352-
assert!(total_messages > 0, "should have received at least some messages");
1350+
assert!(
1351+
total_messages > 0,
1352+
"should have received at least some messages"
1353+
);
13531354
}
13541355

13551356
/// Rapid-fire try_recv_timeout to stress the CancelIoEx / timeout race.
@@ -1502,8 +1503,8 @@ fn stress_shared_memory_concurrent_create() {
15021503
let tx = tx.clone();
15031504
thread::spawn(move || {
15041505
for i in 0..regions_per_thread {
1505-
let size =
1506-
min_size + ((i * 99991 + thread_id as usize * 90001) % (max_size - min_size));
1506+
let size = min_size
1507+
+ ((i * 99991 + thread_id as usize * 90001) % (max_size - min_size));
15071508
let fill_byte = thread_id ^ (i as u8);
15081509
let shmem = OsIpcSharedMemory::from_byte(fill_byte, size);
15091510
// Send the fill byte and expected size in the data payload
@@ -1641,11 +1642,7 @@ fn stress_channel_create_destroy_rapid() {
16411642
let (tx, rx) = platform::channel().unwrap();
16421643
tx.send(data, vec![], vec![]).unwrap();
16431644
let msg = rx.recv().unwrap();
1644-
assert_eq!(
1645-
msg.data, data,
1646-
"data mismatch on iteration {}",
1647-
i
1648-
);
1645+
assert_eq!(msg.data, data, "data mismatch on iteration {}", i);
16491646
// tx and rx drop here, closing handles.
16501647
}
16511648
}

0 commit comments

Comments
 (0)