Clear strMiscWarning before running PartitionAlert #6888

Merged
merged 1 commit into from Oct 26, 2015

Conversation

Projects
None yet
5 participants
@CodeShark
Contributor

CodeShark commented Oct 25, 2015

I was getting strange travis errors earlier because some test that was running prior to PartitionAlert in alert_tests apparently was setting the strMiscWarning variable. Using a side effect such as this as an error handling mechanism is probably not a very good idea to begin with...but if we're going to do this, we should make sure to reset the variable before each call so we can tell which one set it.

Note: The implication here is that something before the call on line 224 is setting this variable and we can't easily figure out what it is...which should probably also be fixed.

Use BOOST_CHECK_MESSAGE() rather than BOOST_CHECK() in alerts_tests.c…
…pp and initialize strMiscWarning before calling PartitionCheck()."

@laanwj laanwj added the Tests label Oct 26, 2015

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Oct 26, 2015

Member

Agree strMiscWarning is terrible, see also #6809
Starting the test with a clean slate makes sense though. ACK.

Member

laanwj commented Oct 26, 2015

Agree strMiscWarning is terrible, see also #6809
Starting the test with a clean slate makes sense though. ACK.

@jtimon

This comment has been minimized.

Show comment
Hide comment
@jtimon

jtimon Oct 26, 2015

Member

ACK

Member

jtimon commented Oct 26, 2015

ACK

@btcdrak

This comment has been minimized.

Show comment
Hide comment
@btcdrak

btcdrak Oct 26, 2015

Member

Tested ACK

Member

btcdrak commented Oct 26, 2015

Tested ACK

@instagibbs

This comment has been minimized.

Show comment
Hide comment
@instagibbs

instagibbs Oct 26, 2015

Member

utACK

Member

instagibbs commented Oct 26, 2015

utACK

@laanwj laanwj merged commit 143d173 into bitcoin:master Oct 26, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Oct 26, 2015

Merge pull request #6888
143d173 Use BOOST_CHECK_MESSAGE() rather than BOOST_CHECK() in alerts_tests.cpp and initialize strMiscWarning before calling PartitionCheck()." (Eric Lombrozo)

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Jan 9, 2016

Use BOOST_CHECK_MESSAGE() rather than BOOST_CHECK() in alerts_tests.c…
…pp and initialize strMiscWarning before calling PartitionCheck()."

Github-Pull: #6888
Rebased-From: 143d173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment