mojolingo / sippy_cup

Create SIP load test scenarios the easy way
http://mojolingo.github.io/sippy_cup
MIT License
218 stars 78 forks source link

Fix non-writing of PCAP file when media is empty #83

Closed chewi closed 6 years ago

chewi commented 9 years ago

This was broken by 893865f3d65e2f89ac9127c8457452fc6f66f0da.

benlangfeld commented 9 years ago

Do you have a test case for this, or more details on the way in which this causes failure?

chewi commented 9 years ago

It's not very broken, it just writes a useless PCAP file when it doesn't need to on calling compile!. This should be avoided not just when @media is nil but also when it is empty, hence we should just use blank? everywhere.

I did write some tests in ebc028b35d8da3a27698eed57628e8a4f0b857c9 and they included testing whether the <nop> tag appears in the XML but they didn't specifically test whether it writes a PCAP file, perhaps because this was awkward.