improvements
This commit is contained in:
parent
f1181ce9c2
commit
b0d0a7a04a
@ -14,5 +14,5 @@ RUN paramfetch 2048 /proof-parameters.json
|
|||||||
|
|
||||||
FROM ubuntu:18.04
|
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
|
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
|
COPY --from=downloader /var/tmp/filecoin-proof-parameters /var/tmp/filecoin-proof-parameters
|
||||||
|
@ -3,7 +3,6 @@ package main
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/libp2p/go-libp2p-core/peer"
|
"github.com/libp2p/go-libp2p-core/peer"
|
||||||
"github.com/testground/sdk-go/sync"
|
"github.com/testground/sdk-go/sync"
|
||||||
@ -40,8 +39,8 @@ func runBaselineBootstrapper(t *TestEnvironment) error {
|
|||||||
return err
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,17 +62,15 @@ func runBaselineMiner(t *TestEnvironment) error {
|
|||||||
if err := miner.fullApi.NetConnect(ctx, addrs[0]); err != nil {
|
if err := miner.fullApi.NetConnect(ctx, addrs[0]); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
time.Sleep(time.Second)
|
|
||||||
|
|
||||||
t.RecordMessage("miner connected to client")
|
t.RecordMessage("miner connected to client")
|
||||||
|
|
||||||
time.Sleep(120 * time.Second)
|
|
||||||
|
|
||||||
// subscribe to clients
|
// subscribe to clients
|
||||||
|
|
||||||
// TODO wait a bit for network to bootstrap
|
// TODO wait a bit for network to bootstrap
|
||||||
// TODO just wait until completion of test, serving requests -- the client does all the job
|
// TODO just wait until completion of test, serving requests -- the client does all the job
|
||||||
|
|
||||||
|
t.SyncClient.MustSignalAndWait(ctx, stateDone, t.TestInstanceCount)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,12 +89,11 @@ func runBaselineClient(t *TestEnvironment) error {
|
|||||||
|
|
||||||
t.RecordMessage("got %v miner addrs", len(addrs))
|
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 generate a number of random "files" and publish them to one or more miners
|
||||||
// TODO broadcast published content CIDs to other clients
|
// TODO broadcast published content CIDs to other clients
|
||||||
// TODO select a random piece of content published by some other client and retreieve it
|
// TODO select a random piece of content published by some other client and retreieve it
|
||||||
|
|
||||||
|
t.SyncClient.MustSignalAndWait(ctx, stateDone, t.TestInstanceCount)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ var (
|
|||||||
minersAddrsTopic = sync.NewTopic("minersAddrsTopic", &peer.AddrInfo{})
|
minersAddrsTopic = sync.NewTopic("minersAddrsTopic", &peer.AddrInfo{})
|
||||||
|
|
||||||
stateReady = sync.State("ready")
|
stateReady = sync.State("ready")
|
||||||
|
stateDone = sync.State("done")
|
||||||
)
|
)
|
||||||
|
|
||||||
type TestEnvironment struct {
|
type TestEnvironment struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user