Skip to content

Commit

Permalink
add jds_should_not_panic_if_jdc_shutsdown integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Shourya742 committed Jan 20, 2025
1 parent ace000e commit e3eb198
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions roles/tests-integration/tests/translator_integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,18 @@ async fn translation_proxy() {
)
.await;
}

#[tokio::test]
async fn jds_should_not_panic_if_jdc_shutsdown() {
let (_tp, tp_addr) = start_template_provider(None).await;
let (_pool, pool_addr) = start_pool(Some(tp_addr)).await;
let (_jds, jds_addr) = start_jds(tp_addr).await;
let (jdc, jdc_addr) = start_jdc(pool_addr, tp_addr, jds_addr).await;
jdc.shutdown();
tokio::time::sleep(std::time::Duration::from_secs(10)).await;
let ret = tokio::net::TcpListener::bind(jdc_addr).await;
assert!(ret.is_ok());
let (sniffer, sniffer_addr) = start_sniffer("0".to_string(), jds_addr, false, None).await;
let (_jdc, _jdc_addr) = start_jdc(pool_addr, tp_addr, sniffer_addr).await;
assert_common_message!(sniffer.next_message_from_downstream(), SetupConnection);
}

0 comments on commit e3eb198

Please sign in to comment.