Skip to content

Commit 52cffb6

Browse files
committed
Remove test_application_crash
1 parent 6cd43a5 commit 52cffb6

File tree

1 file changed

+2
-81
lines changed

1 file changed

+2
-81
lines changed

dc/s2n-quic-dc/src/stream/tests/shared_cache.rs

Lines changed: 2 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ async fn test_connection(
212212
info!("Data exchange completed successfully");
213213
}
214214

215+
#[cfg(not(target_os = "macos"))]
215216
#[tokio::test]
216217
async fn test_kernel_queue_full() {
217218
init_tracing();
@@ -294,87 +295,7 @@ async fn test_kernel_queue_full() {
294295
}
295296
}
296297

297-
#[tokio::test]
298-
async fn test_application_crash() {
299-
init_tracing();
300-
let test_event_subscriber = NoopSubscriber {};
301-
let unix_socket_path = PathBuf::from("/tmp/shared_crash.sock");
302-
303-
let stream_client = create_stream_client();
304-
let handshake_server = create_handshake_server().await;
305-
306-
let handshake_addr = handshake_server.local_addr();
307-
stream_client
308-
.handshake_with(handshake_addr, server_name())
309-
.await
310-
.unwrap();
311-
info!("Handshake completed");
312-
313-
let manager_server = manager::Server::<ServerProvider, NoopSubscriber>::builder()
314-
.with_address("127.0.0.1:0".parse().unwrap())
315-
.with_protocol(Protocol::Tcp)
316-
.with_udp(false)
317-
.with_workers(NonZeroUsize::new(1).unwrap())
318-
.with_socket_path(&unix_socket_path)
319-
.build(handshake_server.clone(), test_event_subscriber.clone())
320-
.unwrap();
321-
322-
info!(
323-
"Manager server created at: {:?}",
324-
manager_server.acceptor_addr()
325-
);
326-
327-
let app_server = create_application_server(&unix_socket_path, test_event_subscriber);
328-
329-
let handshake_addr = handshake_server.local_addr();
330-
let acceptor_addr = manager_server.acceptor_addr().unwrap();
331-
let connection_result = tokio::try_join!(
332-
stream_client.connect(handshake_addr, acceptor_addr, server_name()),
333-
async {
334-
tokio::time::timeout(Duration::from_secs(5), app_server.accept())
335-
.await
336-
.unwrap()
337-
}
338-
);
339-
340-
assert!(
341-
connection_result.is_ok(),
342-
"Connection should be established successfully"
343-
);
344-
let (mut client_stream, server_result) = connection_result.unwrap();
345-
346-
// Application crash
347-
drop(server_result);
348-
drop(app_server);
349-
350-
// Reading from existing stream fails
351-
let mut buffer: Vec<u8> = Vec::new();
352-
let read_result = client_stream.read_into(&mut buffer).await;
353-
info!("Read stream result: {:?}", read_result);
354-
assert!(read_result.is_err());
355-
let error = read_result.unwrap_err();
356-
assert_eq!(error.kind(), std::io::ErrorKind::UnexpectedEof);
357-
info!("Stream error: {}", error.to_string()); // TruncatedTransport
358-
359-
// Create new stream
360-
info!("Trying to open a new stream to app server");
361-
let result = stream_client
362-
.connect(handshake_addr, acceptor_addr, server_name())
363-
.await;
364-
assert!(
365-
result.is_ok(),
366-
"Connection should be established successfully"
367-
);
368-
369-
// Reading from new stream fails
370-
let mut client_stream = result.unwrap();
371-
let read_result = client_stream.read_into(&mut buffer).await;
372-
assert!(read_result.is_err());
373-
let error = read_result.unwrap_err();
374-
assert_eq!(error.kind(), std::io::ErrorKind::UnexpectedEof);
375-
info!("Stream error: {}", error.to_string()); // TruncatedTransport
376-
}
377-
298+
#[cfg(not(target_os = "macos"))]
378299
#[tokio::test]
379300
async fn test_kernel_queue_full_application_crash() {
380301
init_tracing();

0 commit comments

Comments
 (0)