Skip to content

Commit

Permalink
Add test for name access in subsystem
Browse files Browse the repository at this point in the history
  • Loading branch information
girstenbrei committed Jan 10, 2025
1 parent 49195cd commit fcfacb1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -920,3 +920,19 @@ async fn shutdown_through_signal() {
},
);
}

#[tokio::test]
#[traced_test]
async fn access_name_from_within_subsystem() {
let subsys1 = move |subsys: SubsystemHandle| async move {
assert_eq!("/subsys", subsys.name());
BoxedResult::Ok(())
};

Toplevel::new(move |s| async move {
s.start(SubsystemBuilder::new("subsys", subsys1));
})
.handle_shutdown_requests(Duration::from_millis(100))
.await
.unwrap();
}

0 comments on commit fcfacb1

Please sign in to comment.