Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Add automated test (python) for irreversible mode #6843

Merged
merged 11 commits into from
Mar 6, 2019

Conversation

andriantolie
Copy link
Contributor

@andriantolie andriantolie commented Feb 27, 2019

Change Description

Add automated test (python) for the irreversible mode (#6704) which encompasses the following 8 test cases:

  • 1st test case: Replay in irreversible mode with reversible blks

    • Expectation: Node replays and launches successfully with head == libBeforeSwitchMode == lib and forkDbHead == headBeforeSwitchMode == forkDbHeadBeforeSwitchMode
    • Current Bug: duplicate blk added error
  • 2nd test case: Replay in the irreversible mode without reversible blks

    • Expectation: Node replays and launches successfully with head == libBeforeSwitchMode == lib and forkDbHead == headBeforeSwitchMode == forkDbHeadBeforeSwitchMode
    • Current Bug: lib != libBeforeSwitchMode
  • 3rd test case: Switch mode speculative -> irreversible without replay

    • Expectation: Node switches mode successfully with head == libBeforeSwitchMode == lib and forkDbHead == headBeforeSwitchMode == forkDbHeadBeforeSwitchMode
    • Current Bug: head != lib
  • 4th test case: Switch mode irreversible -> speculative without replay

    • Expectation: Node switches mode successfully with head == forkDbHeadBeforeSwitchMode == forkDbHead and lib == headBeforeSwitchMode == libBeforeSwitchMode
    • Current Bug: head != forkDbHead and head != forkDbHeadBeforeSwitchMode and lib != libBeforeSwitchMode
  • 5th test case: Switch mode speculative -> irreversible without replay and connected to producing node

    • Expectation: Node switches mode successfully and the head and lib should be advancing after some blocks produced with head == libBeforeSwitchMode == lib and forkDbHead == headBeforeSwitchMode == forkDbHeadBeforeSwitchMode
    • Current Bug: Fail to switch to irreversible mode, blk_validate_exception next blk in the future will be thrown
  • 6th test case: Switch mode irreversible -> speculative without replay and connected to producing node

    • Expectation: Node switches mode successfully and the head and lib should be advancing after some blocks produced with head == forkDbHeadBeforeSwitchMode == forkDbHead and lib == headBeforeSwitchMode == libBeforeSwitchMode
    • Current Bug: Node switches mode successfully, however, it fails to establish connection with the producing node
  • 7th test case: Replay in the irreversible mode with reversible blks while production is enabled

    • Expectation: Node replays and launches successfully and the head and lib should be advancing after some blocks produced with head == libBeforeSwitchMode == lib and forkDbHead == headBeforeSwitchMode == forkDbHeadBeforeSwitchMode
    • Current Bug: duplicate blk added error
  • 8th test case: Replay in irreversible mode without reversible blks while production is enabled

    • Expectation: Node replays and launches successfully and the head and lib should be advancing after some blocks produced with head == libBeforeSwitchMode == lib and forkDbHead == headBeforeSwitchMode == forkDbHeadBeforeSwitchMode
    • Current Bug: Nothing

Consensus Changes

No

API Changes

No

Documentation Additions

No

@andriantolie andriantolie force-pushed the test-for-irreversible-mode branch 5 times, most recently from bfa5250 to c3c401b Compare February 28, 2019 09:40
@andriantolie andriantolie requested a review from arhag March 4, 2019 06:06
tests/nodeos_irreversible_mode_test.py Outdated Show resolved Hide resolved
tests/nodeos_irreversible_mode_test.py Outdated Show resolved Hide resolved
tests/nodeos_irreversible_mode_test.py Outdated Show resolved Hide resolved
tests/nodeos_irreversible_mode_test.py Outdated Show resolved Hide resolved
tests/nodeos_irreversible_mode_test.py Outdated Show resolved Hide resolved
tests/nodeos_irreversible_mode_test.py Outdated Show resolved Hide resolved
@andriantolie andriantolie force-pushed the test-for-irreversible-mode branch from 9f82fe6 to 8dac679 Compare March 5, 2019 07:37
tests/nodeos_irreversible_mode_test.py Outdated Show resolved Hide resolved
tests/nodeos_irreversible_mode_test.py Outdated Show resolved Hide resolved
tests/nodeos_irreversible_mode_test.py Outdated Show resolved Hide resolved
@andriantolie andriantolie force-pushed the test-for-irreversible-mode branch from 1db5dd5 to c237422 Compare March 6, 2019 07:31
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.

2 participants