influxdb-python
influxdb-python copied to clipboard
Fixed gzip tests by comparing decompressed values
During #852 and #853 I noticed had failures in the test suite for gzip (even though I anticipated that nothing related had been changed by me).
Turns out that gzip uses metadata during compression, here the timestamp, that is then included in the binary compressed results. Therefore
- gzip could be supplied with a static timestamp (possibly also filename, but that did not make a difference for my test runs with one million iterations) to have the same binary output at all times
- the test should compare the decompressed result rather than the binary result
I chose option 2 because it avoids the tests to have an impact on the actual implementation of the client, which would have dirty and, in this case, unnecessary.
Contributor checklist
- [x] Builds are passing
- ~~New tests have been added (for feature additions)~~
- [x] Existing tests have been changed [fixed]