Skip to content

Commit

Permalink
Update e2e workflow branches, update wait times to 20 mins
Browse files Browse the repository at this point in the history
  • Loading branch information
vlady-kotsev committed Jul 8, 2024
1 parent d40c0d7 commit 2a740d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion .github/workflows/run-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- main
- fix/pipelines
pull_request:

concurrency: e2e
Expand Down
24 changes: 12 additions & 12 deletions e2e/helper/verify/hedera.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func SubmittedScheduledTx(t *testing.T, hederaClient *hedera.Client, mirrorNodeC

func ScheduledMintTx(t *testing.T, mirrorNodeClient *mirror_node.Client, account hedera.AccountID, asset string, expectedTransfers []transaction.Transfer, now time.Time) (transactionID, scheduleID string) {
t.Helper()
timeLeft := 180
timeLeft := 20
for {
response, err := mirrorNodeClient.GetAccountTokenMintTransactionsAfterTimestamp(account, now.UnixNano())
if err != nil {
Expand All @@ -231,8 +231,8 @@ func ScheduledMintTx(t *testing.T, mirrorNodeClient *mirror_node.Client, account

if timeLeft > 0 {
fmt.Printf("Could not find any scheduled transactions for account [%s]. Trying again. Time left: ~[%d] seconds\n", account, timeLeft)
timeLeft -= 10
time.Sleep(10 * time.Second)
timeLeft--
time.Sleep(time.Minute)
continue
}
break
Expand All @@ -244,7 +244,7 @@ func ScheduledMintTx(t *testing.T, mirrorNodeClient *mirror_node.Client, account

func ScheduledBurnTx(t *testing.T, mirrorNodeClient *mirror_node.Client, account hedera.AccountID, asset string, expectedTransfers []transaction.Transfer, now time.Time) (transactionID, scheduleID string) {
t.Helper()
timeLeft := 180
timeLeft := 20
for {
response, err := mirrorNodeClient.GetAccountTokenBurnTransactionsAfterTimestamp(account, now.UnixNano())
if err != nil {
Expand All @@ -262,8 +262,8 @@ func ScheduledBurnTx(t *testing.T, mirrorNodeClient *mirror_node.Client, account

if timeLeft > 0 {
fmt.Printf("Could not find any scheduled transactions for account [%s]. Trying again. Time left: ~[%d] seconds\n", account, timeLeft)
timeLeft -= 10
time.Sleep(10 * time.Second)
timeLeft--
time.Sleep(time.Minute)
continue
}
break
Expand All @@ -275,7 +275,7 @@ func ScheduledBurnTx(t *testing.T, mirrorNodeClient *mirror_node.Client, account

func ScheduledNftTransfer(t *testing.T, hederaClient *hedera.Client, mirrorNodeClient *mirror_node.Client, bridgeAccount hedera.AccountID, token string, serialNum int64) (transactionID, scheduleID string) {
sender := hederaClient.GetOperatorAccountID()
timeLeft := 180
timeLeft := 20

for {
response, err := mirrorNodeClient.GetNftTransactions(token, serialNum)
Expand Down Expand Up @@ -306,8 +306,8 @@ func ScheduledNftTransfer(t *testing.T, hederaClient *hedera.Client, mirrorNodeC

if timeLeft > 0 {
fmt.Printf("Could not find any scheduled transactions for account [%s]. Trying again. Time left: ~[%d] seconds\n", bridgeAccount, timeLeft)
timeLeft -= 10
time.Sleep(10 * time.Second)
timeLeft--
time.Sleep(time.Minute)
continue
}
break
Expand Down Expand Up @@ -511,7 +511,7 @@ signatureLoop:
}

func ScheduledNftAllowanceApprove(t *testing.T, hederaClient *hedera.Client, mirrorNodeClient *mirror_node.Client, payerAccount hedera.AccountID, expectedTransactionID string, startTimestamp int64) (transactionID, scheduleID string) {
timeLeft := 180
timeLeft := 20
receiver := hederaClient.GetOperatorAccountID()

for {
Expand Down Expand Up @@ -540,8 +540,8 @@ func ScheduledNftAllowanceApprove(t *testing.T, hederaClient *hedera.Client, mir

if timeLeft > 0 {
fmt.Printf("Could not find any scheduled transactions for NFT Transfer for account [%s]. Trying again. Time left: ~[%d] seconds\n", receiver, timeLeft)
timeLeft -= 10
time.Sleep(10 * time.Second)
timeLeft--
time.Sleep(time.Minute)
continue
}
break
Expand Down

0 comments on commit 2a740d2

Please sign in to comment.