Skip to content

Commit

Permalink
Small tidy in tracing-tracy tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX authored and nagisa committed Jan 2, 2024
1 parent cd135c0 commit 942ac1b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tracing-tracy/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ fn out_of_order() {
}

fn exit_in_different_thread() {
let span = Box::leak(Box::new(span!(Level::INFO, "exit in different thread")));
let span = Box::new(span!(Level::INFO, "exit in different thread"));
let entry = span.enter();
let thread = std::thread::spawn(move || drop(entry));
thread.join().unwrap();
std::thread::scope(|scope| {
let thread = scope.spawn(move || drop(entry));
thread.join().unwrap();
});
}

async fn parent_task(subtasks: usize) {
Expand Down Expand Up @@ -81,11 +83,11 @@ async fn async_futures() {
}

fn message_too_long() {
info!("{}", "a".repeat(u16::max_value().into()));
info!("{}", "a".repeat(u16::MAX.into()));
}

fn long_span_data() {
let data = "c".repeat(u16::max_value().into());
let data = "c".repeat(u16::MAX.into());
info_span!("some span name", "{}", data).in_scope(|| {});
}

Expand Down

0 comments on commit 942ac1b

Please sign in to comment.