Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor some Dash-specific wait_for* functions in tests #3122

Merged
merged 3 commits into from
Oct 2, 2019

Conversation

UdjinM6
Copy link

@UdjinM6 UdjinM6 commented Sep 29, 2019

Refactoring only, should be no changes in behaviour. Ignoring wait_for_instantlock here because its behaviour must be changed.

@UdjinM6 UdjinM6 added this to the 14.1 milestone Sep 29, 2019
Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripted diff fails

~/workspace/dash$ ./contrib/devtools/commit-script-check.sh develop..HEAD
Running script for: d8b9c6bde97ff09c33126173459296a8c6e759c2
sed -i 's/wait_for_chainlock_tip_all_nodes\(/wait_for_chainlocked_tip_all_nodes\(/g' test/functional/*.py
sed -i 's/wait_for_chainlock_tip\(/wait_for_chainlocked_tip\(/g' test/functional/*.py
sed -i 's/wait_for_chainlock\(/wait_for_chainlocked_block\(/g' test/functional/*.py
sed -i 's/wait_for_chainlock /wait_for_chainlocked_block /g' test/functional/*.py
sed: -e expression #1, char 75: Unmatched ( or \(
sed: -e expression #1, char 55: Unmatched ( or \(
sed: -e expression #1, char 53: Unmatched ( or \(

Ran on Ubuntu 16.04

@UdjinM6 UdjinM6 force-pushed the refactorsomewait branch 2 times, most recently from 321f138 to 321fe82 Compare September 29, 2019 10:29
@UdjinM6 UdjinM6 force-pushed the refactorsomewait branch 2 times, most recently from 0424795 to 321fe82 Compare September 29, 2019 14:11
@UdjinM6
Copy link
Author

UdjinM6 commented Sep 29, 2019

This should be fixed now.

On a side note though, it looks like this thing https://github.com/dashpay/dash/blob/develop/ci/build_src.sh#L15 doesn't really work (and I'm not sure why).

@codablock
Copy link

@UdjinM6 I assume the TRAVIS_EVENT_TYPE check should be removed for the commit-script-check.sh to make it work. TRAVIS_EVENT_TYPE is probably only once pull_request, which is when the PR is created first. After that it becomes push as I understand it.

Maybe we should do this change in this PR so that we can also properly test it?

@PastaPastaPasta
Copy link
Member

Imo it should probably be a seperate PR that this gets rebased on, but I don't care that much.

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, scripted diff passes, tests pass

@UdjinM6
Copy link
Author

UdjinM6 commented Sep 30, 2019

The issue with commit-script-check.sh not running should be resolved in #3128

Copy link

@codablock codablock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comment

codablock
codablock previously approved these changes Oct 1, 2019
Copy link

@codablock codablock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

PastaPastaPasta
PastaPastaPasta previously approved these changes Oct 1, 2019
Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

-BEGIN VERIFY SCRIPT-
sed -i 's/wait_for_chainlock_tip_all_nodes(/wait_for_chainlocked_tip_all_nodes(/g' test/functional/*.py
sed -i 's/wait_for_chainlock_tip(/wait_for_chainlocked_tip(/g' test/functional/*.py
sed -i 's/wait_for_chainlock(/wait_for_chainlocked_block(/g' test/functional/*.py
sed -i 's/wait_for_chainlock /wait_for_chainlocked_block /g' test/functional/*.py
-END VERIFY SCRIPT-
@UdjinM6 UdjinM6 dismissed stale reviews from PastaPastaPasta and codablock via ee8fd7c October 1, 2019 14:19
@UdjinM6
Copy link
Author

UdjinM6 commented Oct 1, 2019

Rebased on develop to make sure it merges cleanly after #3123 and also to trigger a scripted diff check after #3128 once again just in case.

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, scripted diff passes as well as tests pass

Copy link

@codablock codablock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-utACK

@UdjinM6 UdjinM6 merged commit 737ac96 into dashpay:develop Oct 2, 2019
barrystyle pushed a commit to PACGlobalOfficial/PAC that referenced this pull request Jan 22, 2020
)

* scripted-diff: Rename `wait_for_chainlock*` test functions

-BEGIN VERIFY SCRIPT-
sed -i 's/wait_for_chainlock_tip_all_nodes(/wait_for_chainlocked_tip_all_nodes(/g' test/functional/*.py
sed -i 's/wait_for_chainlock_tip(/wait_for_chainlocked_tip(/g' test/functional/*.py
sed -i 's/wait_for_chainlock(/wait_for_chainlocked_block(/g' test/functional/*.py
sed -i 's/wait_for_chainlock /wait_for_chainlocked_block /g' test/functional/*.py
-END VERIFY SCRIPT-

* Move `wait_for_*chainlock*` functions from individual tests to DashTestFramework

* Use `wait_until` in most Dash-specific `wait_for*` functions instead of custom timers
@UdjinM6 UdjinM6 deleted the refactorsomewait branch November 26, 2020 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants