Fix TestPruneLogsBySize #7458

Merged
merged 1 commit into from Jun 7, 2017

Conversation

Projects
None yet
3 participants
Member

babbageclunk commented Jun 6, 2017

Description of change

This would occasionally fail because the logs would be pruned down to
below 5000 (since it was slightly above the threshold before
pruning). Instead check that there are more than 2000 records - this
should never be hit. The thing that I was actually concerned with when
adding the check was that there should still be some records left in
the collection (which was a bug I introduced while making changes).

QA steps

Ran the test a lot of times and it didn't fail (although to be honest I couldn't get it to fail for 5000 either).

Bug reference

Caused this failure:
http://reports.vapour.ws/releases/5350/job/run-unit-tests-xenial-amd64/attempt/276

Fix TestPruneLogsBySize
This would occasionally fail because the logs would be pruned down to
below 5000 (since it was slightly above the threshold before
pruning). Instead check that there are more than 2000 records - this
should never be hit. The thing that I was actually concerned with when
adding the check was that there should still be *some* records left in
the collection (that was a bug I introduced while making changes).
Member

babbageclunk commented Jun 6, 2017

$$merge$$

Contributor

jujubot commented Jun 6, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Jun 7, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/11089

@jujubot jujubot merged commit a16a846 into juju:2.2 Jun 7, 2017

1 check passed

github-check-merge-juju Ran tests against PR. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details

jujubot added a commit that referenced this pull request Jun 7, 2017

Merge pull request #7459 from babbageclunk/fix-prune-test-develop
Fix TestPruneLogsBySize

## Description of change

This would occasionally fail because the logs would be pruned down to
below 5000 (since it was slightly above the threshold before
pruning). Instead check that there are more than 2000 records - this
should never be hit. The thing that I was actually concerned with when
adding the check was that there should still be *some* records left in
the collection (that was a bug I introduced while making changes).

(Forward port of #7458 from 2.2 branch.)

## QA steps

Ran the test a lot of times and it didn't fail (although to be honest I couldn't get it to fail for 5000 either).

## Bug reference

Caused this failure:
http://reports.vapour.ws/releases/5350/job/run-unit-tests-xenial-amd64/attempt/276

@babbageclunk babbageclunk deleted the babbageclunk:fix-prune-test branch Jun 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment