-
Notifications
You must be signed in to change notification settings - Fork 204
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
Backport #10883 and #10918 #10924
Backport #10883 and #10918 #10924
Conversation
Requires #10928 |
* Reorder the observers for StreamConsumer to first filter and then take just one element, not the other way around CHANGELOG_BEGIN CHANGELOG_END * Refactor the test to get better stacktraces during failures * Remove unused import
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
val duplicateResponses = | ||
alreadyExistsResponses + internalResponses + abortedResponses | ||
assert( | ||
okResponses == 1 && duplicateResponses == numberOfParallelRequests - 1, |
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.
okResponses == 1 && duplicateResponses == numberOfParallelRequests - 1, | |
okResponses == 1 && duplicateResponses == expectedDuplicateResponses, |
ledger: ParticipantTestContext, | ||
party: Party, | ||
request: T, | ||
submitRequestAndGetStatus: T => Future[Code], |
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.
submitRequestAndGetStatus: T => Future[Code], | |
submitRequestAndGetStatusCode: T => Future[Code], |
import com.daml.ledger.client.binding.Primitive.Party | ||
import com.daml.ledger.test.model.Test.DummyWithAnnotation | ||
import com.daml.ledger.test.model.Test.{Dummy, DummyWithAnnotation} | ||
import io.grpc.Status | ||
import io.grpc.Status.Code |
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 prefer not to import Code
and instead use Status.Code
. I find it clearer. Your call though.
case GrpcException(status, _) => | ||
Future.successful(status.getCode) | ||
case NonFatal(otherException) => | ||
fail(s"Not a GRPC exception $otherException", otherException) |
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.
Why include the exception twice?
fail(s"Not a GRPC exception $otherException", otherException) | |
fail(s"Not a GRPC exception.", otherException) |
None of my comments are mandatory for the backport. I just saw them now and I figured we can address these on |
Backport:
Pull Request Checklist
CHANGELOG_BEGIN
andCHANGELOG_END
tagsNOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.