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
[SCB-300] acceptance test for @Compensable event timeout #173
Conversation
METHOD postHotelBooking | ||
AT ENTRY | ||
IF TRUE | ||
DO debug("delay 10s until the car booking timeout"), |
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.
Debug log is not right
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 bad.
| pack-hotel | TxAbortedEvent | | ||
| pack-car | TxCompensatedEvent | | ||
| pack-hotel | TxCompensatedEvent | | ||
| pack-hotel | SagaEndedEvent | |
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 don't think pack-hotel should send the SagaEndedEvent here.
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'll fix this.
|
||
And Hotel Service contains the following booking orders | ||
| name | amount | confirmed | cancelled | | ||
| Jason | 1 | true | false | |
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.
The Hotel Service should be cancelled. There must be some errors in the Alpha Service.
|
||
Then Car Service contains the following booking orders | ||
| name | amount | confirmed | cancelled | | ||
| Jason | 1 | true | false | |
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.
The Car Service should be cancelled.
It looks like the Accept test result is not good. We need to fix the issue here. |
what is the purpose of this test ? I think it would like to show the scenario that when the saga transaction is timeout, the alpha server call the compensate method is failed and will retry ? The booking service looks like the following steps:
For this test, if we want to simulate the alpha server retries the compensate method when the transaction is timeout, I think it would like to use the byteman rule in the cancel method of HotelBooking (https://github.com/apache/incubator-servicecomb-saga/blob/master/saga-demo/booking/hotel/src/main/java/org/apache/servicecomb/saga/demo/pack/hotel/HotelBookingService.java#L40)
|
Follow this checklist to help us incorporate your contribution quickly and easily:
[SCB-XXX] Fixes bug in ApproximateQuantiles
, where you replaceSCB-XXX
with the appropriate JIRA issue.mvn clean install
to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.Now we have acceptance test for
@SagaStart
event timeout in #171 , we need to test@Compensable
event timeout too.