Skip to content

Commit

Permalink
Upgrade canton to 0.25.0-snapshot supporting lf-1.13 and enable/fix t…
Browse files Browse the repository at this point in the history
…ests (#9915)

Made three tests more flexible in terms of expected error message:
1. CommandServiceIT:CSReturnStackTrace extended parsing to support details= and ;-based format of error properties - found by @daravep
2. CommandServiceIT:CSCreateAndBadExerciseChoice reenable previously expected prior to 7bc925e as a viable error output
3. CommandSubmissionCompletionIT:CSCRefuseBadChoice - same as 2.

changelog_begin
changelog_end
  • Loading branch information
oliverse-da authored Jun 7, 2021
1 parent db14536 commit 1e009b4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
6 changes: 3 additions & 3 deletions deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ java_import(
jars = glob(["lib/**/*.jar"]),
)
""",
sha256 = "2ab610e13cadef0756aa1eebf8be9c40192b7cca1774ebd0df06c662628a6c4d",
strip_prefix = "canton-community-0.24.0",
urls = ["https://www.canton.io/releases/canton-community-0.24.0.tar.gz"],
sha256 = "e97468ddb6b4bd03b05c714fecbf8a2127ba697001a7980a31dd781e7fffa53f",
strip_prefix = "canton-community-0.25.0-SNAPSHOT",
urls = ["https://www.canton.io/releases/canton-community-20210606.tar.gz"],
)
7 changes: 2 additions & 5 deletions ledger/ledger-api-test-tool-on-canton/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ conformance_test(
],
lf_versions = [
"stable",
# FIXME: add latest once canton-test-runner supports LF 1.13
# "latest",
"latest",
],
ports = [
5011,
Expand All @@ -82,7 +81,6 @@ conformance_test(
",ParticipantPruningIT" + # see "conformance-test-participant-pruning" below
",ConfigManagementServiceIT,LedgerConfigurationServiceIT" + # dynamic config management not supported by Canton
",ClosedWorldIT" + # Canton currently fails this test with a different error (missing namespace in "unallocated" party id)
",CommandServiceIT:CSCreateAndBadExerciseChoice,CommandSubmissionCompletionIT:CSCRefuseBadChoice" + # FIXME: canton should be updated with last SDK to produce proper output message for those tests to pass
# Excluding tests that require contract key uniqueness and RWArchiveVsFailedLookupByKey (finding a lookup failure after contract creation)
",RaceConditionIT:WWDoubleNonTransientCreate,RaceConditionIT:WWArchiveVsNonTransientCreate,RaceConditionIT:RWTransientCreateVsNonTransientCreate,RaceConditionIT:RWArchiveVsFailedLookupByKey",
],
Expand All @@ -105,8 +103,7 @@ conformance_test(
],
lf_versions = [
"stable",
# FIXME: add latest once canton-test-runner supports LF 1.13
# "latest",
"latest",
],
ports = [
5011,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ final class CommandServiceIT extends LedgerTestSuite {
Status.Code.INVALID_ARGUMENT,
Some(
Pattern.compile(
"Interpretation error: Error: (User abort: Assertion failed\\.|Unhandled exception: [0-9a-zA-Z\\.:]*@[0-9a-f]*\\{ message = \"Assertion failed\" \\}\\.) Details: Last location: \\[[^\\]]*\\], partial transaction: root node"
"Interpretation error: Error: (User abort: Assertion failed.|Unhandled exception: [0-9a-zA-Z\\.:]*@[0-9a-f]*\\{ message = \"Assertion failed\" \\}\\.) [Dd]etails(: |=)Last location: \\[[^\\]]*\\], partial transaction: root node"
)
),
)
Expand Down Expand Up @@ -543,7 +543,11 @@ final class CommandServiceIT extends LedgerTestSuite {
assertGrpcError(
failure,
Status.Code.INVALID_ARGUMENT,
s"unknown choice $missingChoice",
Some(
Pattern.compile(
"(unknown|Couldn't find requested) choice " + missingChoice
)
),
)
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

package com.daml.ledger.api.testtool.suites

import java.util.regex.Pattern

import com.daml.ledger.api.testtool.infrastructure.Allocation._
import com.daml.ledger.api.testtool.infrastructure.Assertions._
import com.daml.ledger.api.testtool.infrastructure.LedgerTestSuite
Expand Down Expand Up @@ -103,7 +105,11 @@ final class CommandSubmissionCompletionIT extends LedgerTestSuite {
assertGrpcError(
failure,
Status.Code.INVALID_ARGUMENT,
s"unknown choice $badChoice",
Some(
Pattern.compile(
"(unknown|Couldn't find requested) choice " + badChoice
)
),
)
}
})
Expand Down

0 comments on commit 1e009b4

Please sign in to comment.