Skip to content

Commit

Permalink
GH-800: fix the final comment discussion changes
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarshg6 committed Nov 25, 2024
1 parent e7aaa34 commit 7e616e2
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions node/src/stream_handler_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,13 @@ impl StreamHandlerPool {
false
}
Some(None) => {
trace!(
error!(
self.logger,
"While handling RemoveStreamMsg: Stream Writers contain an entry for key {}, but stream writer is missing",
stream_writer_key
"An unpopulated entry in stream_writers was found for a {:?} stream ({:?}) from \
a client. This shouldn't be possible. Investigate!",
msg.stream_type, stream_writer_key
);
true
false
}
Some(Some(_sender_wrapper)) => {
trace!(
Expand Down Expand Up @@ -1293,10 +1294,13 @@ mod tests {

#[test]
fn handle_remove_stream_msg_handles_stream_waiting_for_connect_scenario() {
init_test_logging();
let test_name = "handle_remove_stream_msg_handles_stream_waiting_for_connect_scenario";
let (recorder, _, recording_arc) = make_recorder();
let system = System::new("test");
let system = System::new(test_name);
let sub = recorder.start().recipient::<StreamShutdownMsg>();
let mut subject = StreamHandlerPool::new(vec![], false);
subject.logger = Logger::new(test_name);
let peer_addr = SocketAddr::from_str("1.2.3.4:5678").unwrap();
let local_addr = SocketAddr::from_str("127.0.0.1:0").unwrap();
let sw_key = StreamWriterKey::from(peer_addr);
Expand All @@ -1319,9 +1323,14 @@ mod tests {
&StreamShutdownMsg {
peer_addr,
stream_type: RemovedStreamType::Clandestine,
report_to_counterpart: true
report_to_counterpart: false
}
);
TestLogHandler::new().exists_log_containing(&format!(
"ERROR: {}: An unpopulated entry in stream_writers was found for a \
Clandestine stream ({:?}) from a client. This shouldn't be possible. Investigate!",
test_name, sw_key
));
}

#[test]
Expand Down

0 comments on commit 7e616e2

Please sign in to comment.