1212import static com .hedera .services .bdd .spec .transactions .crypto .HapiCryptoTransfer .tinyBarsFromTo ;
1313import static com .hedera .services .bdd .spec .utilops .UtilVerbs .assertHgcaaLogContainsTimeframe ;
1414import static com .hedera .services .bdd .spec .utilops .UtilVerbs .doWithStartupDuration ;
15+ import static com .hedera .services .bdd .spec .utilops .UtilVerbs .doingContextual ;
1516import static com .hedera .services .bdd .spec .utilops .UtilVerbs .overridingAllOf ;
1617import static com .hedera .services .bdd .spec .utilops .UtilVerbs .sleepForSeconds ;
17- import static com .hedera .services .bdd .spec .utilops .UtilVerbs .withOpContext ;
1818import static com .hedera .services .bdd .suites .HapiSuite .FUNDING ;
1919import static com .hedera .services .bdd .suites .HapiSuite .GENESIS ;
2020import static com .hedera .services .bdd .suites .HapiSuite .ONE_HBAR ;
@@ -46,7 +46,7 @@ public class QuiesceThenMixedOpsRestartTest implements LifecycleTest {
4646 @ LeakyHapiTest (overrides = {"staking.periodMins" , "nodes.nodeRewardsEnabled" })
4747 final Stream <DynamicTest > quiesceAndThenRestartMixedOps () {
4848 final AtomicReference <Instant > scheduleExpiry = new AtomicReference <>();
49- final AtomicReference <Instant > sleepStart = new AtomicReference <>();
49+ final AtomicReference <Instant > logAssertionStart = new AtomicReference <>();
5050 return hapiTest (
5151 // Override properties that interfere with the idle->QUIESCE
5252 // transition and restart so they take effect with a fresh
@@ -59,6 +59,7 @@ final Stream<DynamicTest> quiesceAndThenRestartMixedOps() {
5959 cryptoTransfer (tinyBarsFromTo (GENESIS , FUNDING , 1 )),
6060 // --- actual test workflow ---
6161 cryptoCreate ("scheduledReceiver" ).via ("txn" ).balance (41 * ONE_HBAR ),
62+ doingContextual ((ignored ) -> logAssertionStart .set (Instant .now ())),
6263 doWithStartupDuration ("quiescence.tctDuration" , duration -> scheduleCreate (
6364 "schedule" , cryptoTransfer (tinyBarsFromTo (GENESIS , "scheduledReceiver" , ONE_HBAR )))
6465 .payingWith (GENESIS )
@@ -69,13 +70,12 @@ final Stream<DynamicTest> quiesceAndThenRestartMixedOps() {
6970 getScheduleInfo ("schedule" )
7071 .exposingInfoTo (info -> scheduleExpiry .set (asInstant (info .getExpirationTime ())))
7172 .logged (),
72- withOpContext ((spec , opLog ) -> sleepStart .set (Instant .now ())),
7373 doWithStartupDuration ("quiescence.tctDuration" , duration -> sleepForSeconds (2 * duration .toSeconds ())),
7474 assertHgcaaLogContainsTimeframe (
7575 NodeSelector .byNodeId (0 ),
76- sleepStart ::get ,
77- Duration .ofSeconds (30 ),
78- Duration .ofSeconds (30 ),
76+ logAssertionStart ::get ,
77+ Duration .ofSeconds (20 ),
78+ Duration .ofSeconds (5 ),
7979 "to QUIESCE" ),
8080 doWithStartupDuration ("quiescence.tctDuration" , duration -> sleepForSeconds (4 * duration .toSeconds ())),
8181 getAccountBalance ("scheduledReceiver" ).hasTinyBars (42 * ONE_HBAR ),
0 commit comments