mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 16:57:40 +03:00
CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
253b0b186c
commit
5b139bea60
@ -850,6 +850,7 @@ excluded_test_tool_tests = [
|
||||
"end": "2.3.0-snapshot.20220611.10066.0.458cfc43",
|
||||
"exclusions": [
|
||||
"ExceptionsIT:ExRollbackCreate",
|
||||
"ExceptionsIT:ExRollbackExerciseCreateLookup",
|
||||
],
|
||||
},
|
||||
],
|
||||
|
@ -441,4 +441,16 @@ final class ExceptionsIT extends LedgerTestSuite {
|
||||
}
|
||||
})
|
||||
|
||||
test(
|
||||
"ExRollbackExerciseCreateLookup",
|
||||
"Lookup a contract Archiving a contract created within a rolled-back try-catch block, fails",
|
||||
allocate(SingleParty),
|
||||
)(implicit ec => { case Participants(Participant(ledger, party)) =>
|
||||
for {
|
||||
helper <- ledger.create(party, ExceptionTester(party))
|
||||
withKey <- ledger.create(party, WithSimpleKey(party))
|
||||
_ <- ledger.exercise(party, helper.exerciseRollbackExerciseCreateLookup(_, withKey))
|
||||
} yield ()
|
||||
})
|
||||
|
||||
}
|
||||
|
@ -374,3 +374,16 @@ template ExceptionTester
|
||||
catch
|
||||
Ecid cid ->
|
||||
archive cid
|
||||
|
||||
-- regression test for https://github.com/digital-asset/daml/issues/14171
|
||||
nonconsuming choice RollbackExerciseCreateLookup: ()
|
||||
with cid : ContractId WithSimpleKey
|
||||
controller p
|
||||
do
|
||||
try do
|
||||
exercise cid Archive
|
||||
create (WithSimpleKey p)
|
||||
throw (E "")
|
||||
catch E _ -> pure ()
|
||||
result <- lookupByKey @WithSimpleKey p
|
||||
result === Some cid
|
||||
|
Loading…
Reference in New Issue
Block a user