Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions itests/dummydeal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/filecoin-project/boost/build"
"math/rand"
"net/http"
"net/http/httptest"
Expand Down Expand Up @@ -50,6 +51,10 @@ import (

var log = logging.Logger("boosttest")

func init() {
build.MessageConfidence = 1
}
Comment on lines +54 to +56
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that have an effect... I was under the impression we need to adjust this on the actual devnet.


func setLogLevel() {
_ = logging.SetLogLevel("boosttest", "DEBUG")
_ = logging.SetLogLevel("devnet", "DEBUG")
Expand Down Expand Up @@ -117,8 +122,8 @@ func TestDummydeal(t *testing.T) {
res, err := f.makeDummyDeal(dealUuid, carFilepath, rootCid, server.URL)
require.NoError(t, err)

// Wait for the deal to reach the Published state
err = f.waitForPublished(dealUuid)
// Wait for the deal to be added to a sector
err = f.waitForDealAddedToSector(dealUuid)
require.NoError(t, err)

log.Debugw("got response from MarketDummyDeal", "res", spew.Sdump(res))
Expand Down Expand Up @@ -318,7 +323,7 @@ func (f *testFramework) start() {
}
}

func (f *testFramework) waitForPublished(dealUuid uuid.UUID) error {
func (f *testFramework) waitForDealAddedToSector(dealUuid uuid.UUID) error {
publishCtx, cancel := context.WithTimeout(f.ctx, 300*time.Second)
defer cancel()

Expand All @@ -337,14 +342,14 @@ func (f *testFramework) waitForPublished(dealUuid uuid.UUID) error {
switch {
case deal.Checkpoint == dealcheckpoints.Complete:
return nil
case deal.Checkpoint == dealcheckpoints.PublishConfirmed:
case deal.Checkpoint == dealcheckpoints.AddedPiece:
return nil
}
}

select {
case <-publishCtx.Done():
return fmt.Errorf("timed out waiting for deal publish")
return fmt.Errorf("timed out waiting for deal to be added to a sector")
case <-time.After(time.Second):
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/devnet/devnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func runCmdsWithLog(ctx context.Context, name string, commands [][]string, homeD
func runLotusDaemon(ctx context.Context, home string) {
cmds := [][]string{
{"lotus-seed", "genesis", "new", "localnet.json"},
{"lotus-seed", "pre-seal", "--sector-size=8388608", "--num-sectors=4"},
{"lotus-seed", "pre-seal", "--sector-size=8388608", "--num-sectors=2"},
{"lotus-seed", "genesis", "add-miner", "localnet.json",
filepath.Join(home, ".genesis-sectors", "pre-seal-t01000.json")},
{"lotus", "daemon", "--lotus-make-genesis=dev.gen",
Expand Down