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

[Merged by Bors] - test(systest): improve systest resilience #6171

Closed
wants to merge 19 commits into from

Conversation

acud
Copy link
Contributor

@acud acud commented Jul 22, 2024

Motivation

Improve systest resilience by retrying some of the checks on the Unavailable error.

Description

Test Plan

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed
  • Update changelog as needed

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.8%. Comparing base (02bcbe9) to head (afbe21d).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #6171     +/-   ##
=========================================
- Coverage     81.9%   81.8%   -0.1%     
=========================================
  Files          301     301             
  Lines        32606   32606             
=========================================
- Hits         26711   26703      -8     
- Misses        4167    4172      +5     
- Partials      1728    1731      +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acud
Copy link
Contributor Author

acud commented Jul 23, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 23, 2024
@spacemesh-bors
Copy link

try

Build succeeded:

@acud acud force-pushed the systest-unavailable-err branch from b5c9873 to c8b1bd8 Compare July 23, 2024 15:43
@acud
Copy link
Contributor Author

acud commented Jul 23, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 23, 2024
@spacemesh-bors
Copy link

try

Build failed:

@acud
Copy link
Contributor Author

acud commented Jul 23, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 23, 2024
@spacemesh-bors
Copy link

try

Build failed:

@acud
Copy link
Contributor Author

acud commented Jul 23, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 23, 2024
@spacemesh-bors
Copy link

try

Build failed:

@acud
Copy link
Contributor Author

acud commented Jul 23, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 23, 2024
@spacemesh-bors
Copy link

try

Build failed:

@acud
Copy link
Contributor Author

acud commented Jul 23, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 23, 2024
@spacemesh-bors
Copy link

try

Build succeeded:

@acud
Copy link
Contributor Author

acud commented Jul 24, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 24, 2024
@spacemesh-bors
Copy link

try

Build failed:

@acud
Copy link
Contributor Author

acud commented Jul 24, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 24, 2024
@spacemesh-bors
Copy link

try

Build failed:

@acud
Copy link
Contributor Author

acud commented Jul 24, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 24, 2024
@spacemesh-bors
Copy link

try

Build failed:

@acud
Copy link
Contributor Author

acud commented Jul 25, 2024

bors try

@acud acud requested a review from ivan4th as a code owner July 26, 2024 15:42
systest/Makefile Outdated Show resolved Hide resolved
systest/cluster/cluster.go Show resolved Hide resolved
systest/testcontext/context.go Outdated Show resolved Hide resolved
systest/tests/common.go Show resolved Hide resolved
systest/tests/common.go Show resolved Hide resolved
systest/tests/common.go Show resolved Hide resolved
systest/tests/common.go Show resolved Hide resolved
@spacemesh-bors
Copy link

try

Build failed:

acud and others added 3 commits July 26, 2024 13:35
Co-authored-by: Matthias Fasching <5011972+fasmat@users.noreply.github.com>
@acud
Copy link
Contributor Author

acud commented Jul 26, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 26, 2024
@spacemesh-bors
Copy link

try

Build succeeded:

@acud
Copy link
Contributor Author

acud commented Jul 28, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 28, 2024
@spacemesh-bors
Copy link

try

Build succeeded:

@acud
Copy link
Contributor Author

acud commented Jul 29, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 29, 2024
@spacemesh-bors
Copy link

try

Build failed:

@spacemeshos spacemeshos deleted a comment from spacemesh-bors bot Jul 29, 2024
@acud
Copy link
Contributor Author

acud commented Jul 29, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 29, 2024
@spacemesh-bors
Copy link

try

Build succeeded:

@acud
Copy link
Contributor Author

acud commented Jul 29, 2024

bors try

spacemesh-bors bot added a commit that referenced this pull request Jul 29, 2024
@spacemesh-bors
Copy link

try

Build failed:

Comment on lines +379 to +386
func (c *Context) CheckFail() error {
select {
case <-failed:
return errors.New("test suite failed. aborting test execution")
default:
}
return nil
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't atomic.Bool be more straightforward to use?

failed atomic.Bool
...
t.Cleanup(func() {
	if t.Failed() {
		failed.Set(true)
	}
})
Suggested change
func (c *Context) CheckFail() error {
select {
case <-failed:
return errors.New("test suite failed. aborting test execution")
default:
}
return nil
}
func (c *Context) CheckFail() error {
if failed.Load() {
return errors.New("test suite failed. aborting test execution")
}
return nil
}

@acud
Copy link
Contributor Author

acud commented Aug 2, 2024

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Aug 2, 2024
## Motivation

Improve systest resilience by retrying some of the checks on the `Unavailable` error.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Aug 2, 2024

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title test(systest): improve systest resilience [Merged by Bors] - test(systest): improve systest resilience Aug 2, 2024
@spacemesh-bors spacemesh-bors bot closed this Aug 2, 2024
@spacemesh-bors spacemesh-bors bot deleted the systest-unavailable-err branch August 2, 2024 20:26
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.

4 participants