Remove test race condition

This commit is contained in:
Tyler Benson 2020-01-13 16:21:37 -08:00
parent a4db31cf79
commit 3aea763769
1 changed files with 4 additions and 5 deletions

View File

@ -148,14 +148,13 @@ class DDAgentWriterTest extends DDSpecification {
then: then:
5 * api.serializeTrace(_) >> { trace -> callRealMethod() } 5 * api.serializeTrace(_) >> { trace -> callRealMethod() }
1 * api.sendSerializedTraces(5, _, { it.size() == 5 }) >> { 1 * api.sendSerializedTraces(5, _, { it.size() == 5 }) >> DDAgentApi.Response.success(200)
phaser.arrive()
return DDAgentApi.Response.success(200)
}
5 * monitor.onPublish(_, _) 5 * monitor.onPublish(_, _)
5 * monitor.onSerialize(_, _, _) 5 * monitor.onSerialize(_, _, _)
1 * monitor.onFlush(_, _) 1 * monitor.onFlush(_, _)
(0..1) * monitor.onSend(_, _, _, _) // This gets called after phaser.arrive(), so there's a race condition. 1 * monitor.onSend(_, _, _, _) >> {
phaser.arrive()
}
0 * _ 0 * _
cleanup: cleanup: