@@ -104,18 +104,18 @@ utils.verifyConsumeTransaction = ({ t, tx, topic, clientId }) => {
104
104
* Asserts the properties on both the produce and consume transactions
105
105
* @param {object } params function params
106
106
* @param {object } params.t test instance
107
- * @param {object } params.consumeTx consumer transaction
107
+ * @param {object } params.consumeTxs consumer transactions
108
108
* @param {object } params.produceTx produce transaction
109
109
*/
110
- utils . verifyDistributedTrace = ( { t, consumeTx , produceTx } ) => {
110
+ utils . verifyDistributedTrace = ( { t, consumeTxs , produceTx } ) => {
111
111
t . ok ( produceTx . isDistributedTrace , 'should mark producer as distributed' )
112
- t . ok ( consumeTx . isDistributedTrace , 'should mark consumer as distributed' )
113
-
114
- t . equal ( consumeTx . incomingCatId , null , 'should not set old CAT properties' )
115
-
116
- t . equal ( produceTx . id , consumeTx . parentId , 'should have proper parent id' )
117
- t . equal ( produceTx . traceId , consumeTx . traceId , 'should have proper trace id' )
118
112
const produceSegment = produceTx . trace . root . children [ 3 ]
119
- t . equal ( produceSegment . id , consumeTx . parentSpanId , 'should have proper parentSpanId' )
120
- t . equal ( consumeTx . parentTransportType , 'Kafka' , 'should have correct transport type' )
113
+ consumeTxs . forEach ( ( consumeTx ) => {
114
+ t . ok ( consumeTx . isDistributedTrace , 'should mark consumer as distributed' )
115
+ t . equal ( consumeTx . incomingCatId , null , 'should not set old CAT properties' )
116
+ t . equal ( produceTx . id , consumeTx . parentId , 'should have proper parent id' )
117
+ t . equal ( produceTx . traceId , consumeTx . traceId , 'should have proper trace id' )
118
+ t . equal ( produceSegment . id , consumeTx . parentSpanId , 'should have proper parentSpanId' )
119
+ t . equal ( consumeTx . parentTransportType , 'Kafka' , 'should have correct transport type' )
120
+ } )
121
121
}
0 commit comments