-
Notifications
You must be signed in to change notification settings - Fork 63
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 test for renegotiating proposals #1498
Conversation
.build() | ||
) | ||
|
||
async def negotiate_begin(requestor, demand, providers): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My initial thought here: at least some of these internal helper functions can be moved to goth_tests/helpers/negotiation.py
(once the PR is considered ready).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it, but I think that this helpers are specific to renegotiation test. The commonly used helper is goth_tests.helpers.negotiation.negotiate_agreements()
. I can't think of a common use for those custom helpers.
subscription_id | ||
) | ||
logger.info("collected offers: %s", collected_offers) | ||
assert len(collected_offers) == 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This binds invocation of this fn to the very specific place within the scenario. If invoked before requestor-1
is finished we will get only 1 proposal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the reneegotiate() should be called after first requestor finished.
async with runner(config.containers): | ||
requestor1, requestor2 = runner.get_probes(probe_type=RequestorProbe) | ||
providers = runner.get_probes(probe_type=ProviderProbe) | ||
assert providers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added this line as @zakaprov did in above tests, and indeed providers
was empty list
73ce416
to
5567175
Compare
@tworec I didn't get a chance to review these changes before merging. @jiivan How does this relate to golemfactory/yapapi#551 ? |
:( This part tests a scenario where provider rejects proposal and then renegotiates. In yapapi, requestor rejects proposal and then renegotiates. |
fixes: #1423