Fix Observation test race condition

The latch is counted down before the `Observation` is stopped
This commit is contained in:
Artem Bilan
2022-08-31 16:43:54 -04:00
parent 9c4c5283ba
commit 56aaa4a87a

View File

@@ -213,8 +213,8 @@ public class ObservationPropagationChannelInterceptorTests {
Observation.createNotStarted("user.code", receiverContext, this.observationRegistry)
.observe(() -> {
// Let's assume that this is the user code
handleLatch.countDown();
});
handleLatch.countDown();
});
// This would be the instrumentation code on the sender side (user's code would call e.g. MessageTemplate and this code