Skip to content

Commit

Permalink
asd
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa-ethernal committed May 30, 2024
1 parent 2b44d17 commit 8113824
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions e2e-polybft/e2e/apex_bridge_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ func TestE2E_ApexBridge_ValidScenarios(t *testing.T) {
// })

t.Run("Both directions 300x 20min 90%", func(t *testing.T) {
instances := 300
instances := 200
maxWaitTime := 1200
fundSendAmount := uint64(5_000_000)
sendAmount := uint64(1_000_000)
Expand Down Expand Up @@ -992,29 +992,23 @@ func TestE2E_ApexBridge_ValidScenarios(t *testing.T) {
// }, 1000, time.Second*10)
// require.NoError(t, err)
// fmt.Printf("%v TXs confirmed on Prime\n", succeededCountPrime)
for i := 0; i < 1000; i++ {
newAmountPrime, err := cardanofw.GetTokenAmount(ctx, txProviderVector, user.VectorAddress)
require.NoError(t, err)
fmt.Printf("Current Amount Prime: %v\n", newAmountPrime)

if newAmountPrime.Uint64() == expectedAmountPrime {
break
}

time.Sleep(time.Second * 10)
}

// err = wallet.WaitForAmount(context.Background(), txProviderPrime, user.PrimeAddress, func(val *big.Int) bool {
// return val.Cmp(new(big.Int).SetUint64(expectedAmountVector)) == 0
// }, 1000, time.Second*10)
// require.NoError(t, err)
// fmt.Printf("%v TXs confirmed on Vector\n", succeededCountVector)

for i := 0; i < 1000; i++ {
newAmountPrime, err := cardanofw.GetTokenAmount(ctx, txProviderVector, user.VectorAddress)
require.NoError(t, err)
fmt.Printf("Current Amount Prime: %v. Expected: %v\n", newAmountPrime, expectedAmountPrime)

newAmountVector, err := cardanofw.GetTokenAmount(ctx, txProviderPrime, user.PrimeAddress)
require.NoError(t, err)
fmt.Printf("Current Amount Vector: %v\n", newAmountVector)
fmt.Printf("Current Amount Vector: %v. Expected: %v\n", newAmountVector, expectedAmountVector)

if newAmountVector.Uint64() == expectedAmountVector {
if newAmountPrime.Uint64() == expectedAmountPrime && newAmountVector.Uint64() == expectedAmountVector {
break
}

Expand Down

0 comments on commit 8113824

Please sign in to comment.