diff --git a/docker-images/Dockerfile.oni-runtime b/docker-images/Dockerfile.oni-runtime index 568d65c98..4c046c5ec 100644 --- a/docker-images/Dockerfile.oni-runtime +++ b/docker-images/Dockerfile.oni-runtime @@ -14,5 +14,5 @@ RUN paramfetch 2048 /proof-parameters.json FROM ubuntu:18.04 -RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq gcc pkg-config -COPY --from=downloader /var/tmp/filecoin-proof-parameters /var/tmp/filecoin-proof-parameters \ No newline at end of file +RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq gcc pkg-config net-tools netcat traceroute iputils-ping wget vim curl telnet iproute2 dnsutils +COPY --from=downloader /var/tmp/filecoin-proof-parameters /var/tmp/filecoin-proof-parameters diff --git a/lotus-soup/baseline.go b/lotus-soup/baseline.go index 406d54199..001066d5e 100644 --- a/lotus-soup/baseline.go +++ b/lotus-soup/baseline.go @@ -3,7 +3,6 @@ package main import ( "context" "fmt" - "time" "github.com/libp2p/go-libp2p-core/peer" "github.com/testground/sdk-go/sync" @@ -40,8 +39,8 @@ func runBaselineBootstrapper(t *TestEnvironment) error { return err } - // TODO just wait until completion of test, nothing else to do - + ctx := context.Background() + t.SyncClient.MustSignalAndWait(ctx, stateDone, t.TestInstanceCount) return nil } @@ -63,17 +62,15 @@ func runBaselineMiner(t *TestEnvironment) error { if err := miner.fullApi.NetConnect(ctx, addrs[0]); err != nil { return err } - time.Sleep(time.Second) t.RecordMessage("miner connected to client") - time.Sleep(120 * time.Second) - // subscribe to clients // TODO wait a bit for network to bootstrap // TODO just wait until completion of test, serving requests -- the client does all the job + t.SyncClient.MustSignalAndWait(ctx, stateDone, t.TestInstanceCount) return nil } @@ -92,12 +89,11 @@ func runBaselineClient(t *TestEnvironment) error { t.RecordMessage("got %v miner addrs", len(addrs)) - time.Sleep(120 * time.Second) - // TODO generate a number of random "files" and publish them to one or more miners // TODO broadcast published content CIDs to other clients // TODO select a random piece of content published by some other client and retreieve it + t.SyncClient.MustSignalAndWait(ctx, stateDone, t.TestInstanceCount) return nil } diff --git a/lotus-soup/node.go b/lotus-soup/node.go index 6286509eb..0f0f1efb6 100644 --- a/lotus-soup/node.go +++ b/lotus-soup/node.go @@ -60,6 +60,7 @@ var ( minersAddrsTopic = sync.NewTopic("minersAddrsTopic", &peer.AddrInfo{}) stateReady = sync.State("ready") + stateDone = sync.State("done") ) type TestEnvironment struct {