Fix race codition in AgentWriterTest
@@ -34,7 +34,6 @@ class AgentWriterTest extends Specification {
isValid() >> true
}]
def writer = new AgentWriter(client)
- writer.start()
when:
for (def trace : traces) {
@@ -43,6 +42,10 @@ class AgentWriterTest extends Specification {
incrementTraceCountBy.times {
writer.incrementTraceCount()
}
+
+ // Starting writer after submissions to make sure all updates go out in 1 request
+ writer.start()
+
Thread.sleep(FLUSH_DELAY)
then:
