Skip to content

Commit

Permalink
itest: further reduce itest run time
Browse files Browse the repository at this point in the history
We fix some additional issues of long-running (>10 seconds) integration
tests.
  • Loading branch information
guggero committed Mar 5, 2024
1 parent c47864e commit f51c888
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions itest/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1717,8 +1717,8 @@ func assertGroups(t *testing.T, client taprpc.TaprootAssetsClient,

// assetRoots is a helper method that fetches all roots from a given universe
// rpc by scanning for all pages.
func assetRoots(ctx context.Context,
uni unirpc.UniverseClient, pageSize int32) (*unirpc.AssetRootResponse, error) {
func assetRoots(ctx context.Context, uni unirpc.UniverseClient,
pageSize int32) (*unirpc.AssetRootResponse, error) {

offset := int32(0)
roots := make(map[string]*unirpc.UniverseRoot)
Expand Down
4 changes: 2 additions & 2 deletions itest/universe_federation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
// node is offline at the time of the initial sync attempt.
func testMintProofRepeatFedSyncAttempt(t *harnessTest) {
// Create a new minting node, without hooking it up to any existing
// Universe server. We will also set the sync ticker to 4 second, so
// Universe server. We will also set the sync ticker to 2 second, so
// that we can test that the proof push sync is retried and eventually
// succeeds after the fed server peer node reappears online.
syncTickerInterval := 4 * time.Second
syncTickerInterval := 2 * time.Second
mintingNode := setupTapdHarness(
t.t, t, t.lndHarness.Bob, nil,
func(params *tapdHarnessParams) {
Expand Down
10 changes: 4 additions & 6 deletions itest/universe_pagination_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ const (

// testPageSizeSmall is the page size to use when fetching data from the
// universe rpc. We use a small page size to test pagination.
testPageSizeSmall = 2
testPageSizeSmall = 10

// testGroupSize is the size of the asset group we mint in the
// testUniversePaginationSimple test.
testGroupSize = 79
)

func testUniversePaginationSimple(t *harnessTest) {
mintSize := 255
mintSize := 50
timeout := defaultWaitTimeout

// If we create a second tapd instance and sync the universe state,
Expand Down Expand Up @@ -211,10 +211,8 @@ func mintBatchAssetsTest(
require.NoError(t, err)

require.Eventually(t, func() bool {
return AssertUniverseStateEqual(
t, alice, bob,
)
}, minterTimeout, time.Second)
return AssertUniverseStateEqual(t, alice, bob)
}, minterTimeout, 200*time.Millisecond)
}

// fetchAllLeafKeys fetches all leaf keys for a given universe ID.
Expand Down

0 comments on commit f51c888

Please sign in to comment.