Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Fixed gzip tests by comparing decompressed values #854

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DrakezulsMinimalism
Copy link

@DrakezulsMinimalism DrakezulsMinimalism commented Oct 9, 2020

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

  1. 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
  2. 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
  • Builds are passing
  • New tests have been added (for feature additions)
  • Existing tests have been changed [fixed]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant