oasisprotocol / oasisprotocol/oasis-core

Make error checking when running oasis-node binary in E2E tests more granular

Open
#2,574 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

c:testing
Dominant language
Go
Stars
369
Forks
151
Avg merge
1d 3h
Merged PRs (30d)
6

Description

SUMMARY

Our current E2E test harness has a startOasisNode() method which accepts a boolean argument termEarlyOk that, if set to true, disables error reporting when running the oasis-node binary results in ErrEarlyTerm error:

https://github.com/oasislabs/oasis-core/blob/66caa2a4dd473915fc3223e5def34ab750009084/go/oasis-test-runner/oasis/oasis.go#L614-L616

The termEarlyOk argument must be set to true for Byzantine nodes because these nodes are expected to crash.

However, when there is a more fundamental issue, e.g. a Byzantine node terminates with a panic, the End-to-End tests will not differentiate between this and an expected crash and just "hang" forever, waiting for the tests to complete.

ISSUE TYPE
  • Feature Idea

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with startOasisNode() in go/oasis-test-runner/oasis/oasis.go, then read ErrEarlyTerm in go/oasis-test-runner/env/env.go and the Byzantine-node call in go/oasis-test-runner/oasis/byzantine.go. Trace how early termination is currently handled and define the error distinction needed so an unexpected panic is reported instead of leaving the E2E tests hanging.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.