@@ -37,6 +37,7 @@ class AppSecSpanPostProcessorTest extends DDSpecification {
37
37
1 * producer. publishDataEvent(_, ctx, _, _)
38
38
1 * ctx. commitDerivatives(traceSegment)
39
39
1 * ctx. setKeepOpenForApiSecurityPostProcessing(false )
40
+ 1 * ctx. closeAdditive()
40
41
1 * ctx. close()
41
42
1 * sampler. releaseOne()
42
43
0 * _
@@ -61,6 +62,7 @@ class AppSecSpanPostProcessorTest extends DDSpecification {
61
62
1 * ctx. isKeepOpenForApiSecurityPostProcessing() >> true
62
63
1 * sampler. sampleRequest(_) >> false
63
64
1 * ctx. setKeepOpenForApiSecurityPostProcessing(false )
65
+ 1 * ctx. closeAdditive()
64
66
1 * ctx. close()
65
67
1 * sampler. releaseOne()
66
68
0 * _
@@ -88,6 +90,7 @@ class AppSecSpanPostProcessorTest extends DDSpecification {
88
90
1 * reqCtx. getTraceSegment() >> traceSegment
89
91
1 * producer. getDataSubscribers(_) >> null
90
92
1 * ctx. setKeepOpenForApiSecurityPostProcessing(false )
93
+ 1 * ctx. closeAdditive()
91
94
1 * ctx. close() >> { throw new RuntimeException () }
92
95
1 * sampler. releaseOne()
93
96
0 * _
@@ -111,6 +114,7 @@ class AppSecSpanPostProcessorTest extends DDSpecification {
111
114
1 * reqCtx. getData(_) >> ctx
112
115
1 * ctx. isKeepOpenForApiSecurityPostProcessing() >> true
113
116
1 * ctx. setKeepOpenForApiSecurityPostProcessing(false )
117
+ 1 * ctx. closeAdditive()
114
118
1 * ctx. close()
115
119
1 * sampler. releaseOne()
116
120
0 * _
@@ -208,6 +212,7 @@ class AppSecSpanPostProcessorTest extends DDSpecification {
208
212
1 * producer. getDataSubscribers(_) >> subInfo
209
213
1 * subInfo. isEmpty() >> true
210
214
1 * ctx. setKeepOpenForApiSecurityPostProcessing(false )
215
+ 1 * ctx. closeAdditive()
211
216
1 * ctx. close()
212
217
1 * sampler. releaseOne()
213
218
0 * _
@@ -238,6 +243,7 @@ class AppSecSpanPostProcessorTest extends DDSpecification {
238
243
1 * subInfo. isEmpty() >> false
239
244
1 * producer. publishDataEvent(_, ctx, _, _) >> { throw new ExpiredSubscriberInfoException () }
240
245
1 * ctx. setKeepOpenForApiSecurityPostProcessing(false )
246
+ 1 * ctx. closeAdditive()
241
247
1 * ctx. close()
242
248
1 * sampler. releaseOne()
243
249
0 * _
0 commit comments