Remove test race condition
This commit is contained in:
parent
a4db31cf79
commit
3aea763769
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue