|
52 | 52 | }) |
53 | 53 | .then(() => |
54 | 54 | channel.consume(queueForExchangeName, msg => { |
55 | | - expect(msg.properties.headers['X-INSTANA-L']).to.not.exist; |
56 | | - expect(msg.properties.headers['X-INSTANA-S']).to.not.exist; |
57 | | - expect(msg.properties.headers['X-INSTANA-T']).to.not.exist; |
58 | | - expect(msg.properties.headers['x-instana-l']).to.not.exist; |
59 | | - expect(msg.properties.headers['x-instana-s']).to.not.exist; |
60 | | - expect(msg.properties.headers['x-instana-t']).to.not.exist; |
| 55 | + if (msg.properties.headers) { |
| 56 | + expect(msg.properties.headers['X-INSTANA-L']).to.not.exist; |
| 57 | + expect(msg.properties.headers['X-INSTANA-S']).to.not.exist; |
| 58 | + expect(msg.properties.headers['X-INSTANA-T']).to.not.exist; |
| 59 | + expect(msg.properties.headers['x-instana-l']).to.not.exist; |
| 60 | + expect(msg.properties.headers['x-instana-s']).to.not.exist; |
| 61 | + expect(msg.properties.headers['x-instana-t']).to.not.exist; |
| 62 | + } |
61 | 63 |
|
62 | 64 | if (msg !== null) { |
63 | 65 | log(msg.content.toString()); |
|
85 | 87 | ) |
86 | 88 | .then(() => |
87 | 89 | channel.consume(queueName, msg => { |
88 | | - console.log(msg); |
89 | | - expect(msg.properties.headers['X-INSTANA-L']).to.not.exist; |
90 | | - expect(msg.properties.headers['X-INSTANA-S']).to.not.exist; |
91 | | - expect(msg.properties.headers['X-INSTANA-T']).to.not.exist; |
92 | | - expect(msg.properties.headers['x-instana-l']).to.not.exist; |
93 | | - expect(msg.properties.headers['x-instana-s']).to.not.exist; |
94 | | - expect(msg.properties.headers['x-instana-t']).to.not.exist; |
| 90 | + if (msg.properties.headers) { |
| 91 | + expect(msg.properties.headers['X-INSTANA-L']).to.not.exist; |
| 92 | + expect(msg.properties.headers['X-INSTANA-S']).to.not.exist; |
| 93 | + expect(msg.properties.headers['X-INSTANA-T']).to.not.exist; |
| 94 | + expect(msg.properties.headers['x-instana-l']).to.not.exist; |
| 95 | + expect(msg.properties.headers['x-instana-s']).to.not.exist; |
| 96 | + expect(msg.properties.headers['x-instana-t']).to.not.exist; |
| 97 | + } |
95 | 98 |
|
96 | 99 | if (msg !== null) { |
97 | 100 | log(msg.content.toString()); |
|
0 commit comments