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

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
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
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