Skip to content

Commit

Permalink
add additional 2 tests to ScheduleCreateSpecs (#10129)
Browse files Browse the repository at this point in the history
Signed-off-by: Lev Povolotsky <lev@swirldslabs.com>
  • Loading branch information
povolev15 committed Nov 28, 2023
1 parent 2613f05 commit 0203ede
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,15 @@ private boolean isPresentIn(
for (final Schedule candidate : possibleDuplicates) {
if (compareForDuplicates(candidate, provisionalSchedule)) {
// Do not forget to set the ID of the existing duplicate in the receipt...
context.recordBuilder(ScheduleRecordBuilder.class).scheduleID(candidate.scheduleId());
TransactionID scheduledTransactionID = candidate
.originalCreateTransaction()
.transactionID()
.copyBuilder()
.scheduled(true)
.build();
context.recordBuilder(ScheduleRecordBuilder.class)
.scheduleID(candidate.scheduleId())
.scheduledTransactionID(scheduledTransactionID);
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ private HapiSpec notIdenticalScheduleIfAdminKeyChanges() {
.payingWith(FIRST_PAYER));
}

@HapiTest
private HapiSpec recognizesIdenticalScheduleEvenWithDifferentDesignatedPayer() {
return defaultHapiSpec("recognizesIdenticalScheduleEvenWithDifferentDesignatedPayer")
.given(
Expand Down Expand Up @@ -556,7 +557,7 @@ public HapiSpec rejectsFunctionlessTxn() {
.payingWith(GENESIS));
}

// Disabled because schedule throttle is not implemented yet
@HapiTest
public HapiSpec functionlessTxnBusyWithNonExemptPayer() {
return defaultHapiSpec("FunctionlessTxnBusyWithNonExemptPayer")
.given()
Expand Down

0 comments on commit 0203ede

Please sign in to comment.