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

GOTH - Power outage test #668

Merged
merged 4 commits into from
Sep 27, 2021
Merged

GOTH - Power outage test #668

merged 4 commits into from
Sep 27, 2021

Conversation

maaktweluit
Copy link
Contributor

Resolves: golemfactory/yagna#1508

Add a power outage test where one provider is stopped after receiving a task data.
The test expects all tasks to be finished but not all invoices to be paid.

Possible improvements:

  • the test waits 30 seconds for the invoices to time out, would be nice to make this 5 or 10 to complete the test faster.

@maaktweluit maaktweluit requested a review from a team September 21, 2021 08:07
@maaktweluit maaktweluit self-assigned this Sep 21, 2021
@maaktweluit maaktweluit force-pushed the mwu/goth-power-outage branch 2 times, most recently from 019109a to e19240a Compare September 23, 2021 09:48
Copy link
Contributor

@nieznanysprawiciel nieznanysprawiciel left a comment

Choose a reason for hiding this comment

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

After rethinking, I don't want to move this test to yagna repository. Probably this test belongs to testing session set


logger.debug("Stopping provider 1")
await provider_1.stop()
provider_1.container.stop()
Copy link
Contributor

Choose a reason for hiding this comment

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

Since goth version 0.7.2 (latest patch release) Container.stop gets called as part of Probe.stop, so this line is no longer necessary. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

awesome, goth keeps getting better :D

logger.info("All tasks computed, waiting for Golem shutdown")

await cmd_monitor.wait_for_pattern(".*Unpaid agreements: .*")
logger.info("Expected 1 unpaid agreement")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
logger.info("Expected 1 unpaid agreement")
logger.info("Found expected unpaid agreement")

await provider_1.stop()
provider_1.container.stop()
logger.info("Provider 1 stopped.")
provider_1.container.restart()
Copy link
Contributor

Choose a reason for hiding this comment

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

And this shouldn't be necessary with goth version 0.7.3. :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

great! can update this in a cleanup PR if needed :)

@shadeofblue shadeofblue merged commit b302198 into master Sep 27, 2021
@shadeofblue shadeofblue deleted the mwu/goth-power-outage branch September 27, 2021 18:31
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.

Goth: Provider power outage while computing a task
4 participants