You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Kirk Lund <kl...@apache.org> on 2019/07/09 19:56:13 UTC

Pair of gists showing example regression tests

I wrote this up to help out a contributor with a pull request and thought
it might interest others as well.

The ticket is GEODE-3718 The InternalResourceManager fails to shutdown if a
redundancy recovery task is scheduled but hasn't fired yet
<https://issues.apache.org/jira/browse/GEODE-3718>

I've put together two gists which show a new InternalResourceManagerTest
before and after the fix for GEODE-3718.

In theory, you could create a regression test that confirms the existence
of a bug before fixing it and even attach it to the Jira ticket to help
whoever ends up working on the ticket. In practice, if you are fixing the
ticket, you might just write the 2nd form of the test which confirms the
fix for the bug.

1) The first gist shows a new [InternalResourceManagerTest which confirms
the existence of GEODE-3718 before fixing it](
https://gist.github.com/kirklund/e96c2c23fcd65ad9bc48d448f3b27118).

2) The second gist shows a newer version of [InternalResourceManagerTest
which confirms that GEODE-3718 has been fixed](
https://gist.github.com/kirklund/658809117a8312f97b7628809d339fa2).

#2 reflects the kind of test that should be included in the PR that fixes a
bug. The test proves that the bug is fixed and prevents future regressions
involving that bug being reintroduced in some way.