Skip to content

Commit

Permalink
increase pinDelay and delay times
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
  • Loading branch information
lanzafame committed May 2, 2018
1 parent 66bca9d commit f3b9b8a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ipfscluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func delay() {
}

func pinDelay() {
time.Sleep(400 * time.Millisecond)
time.Sleep(700 * time.Millisecond)
}

func ttlDelay() {
Expand Down Expand Up @@ -418,6 +418,8 @@ func TestClustersPin(t *testing.T) {
}
delay()
delay()
delay()
delay()
fpinned := func(t *testing.T, c *Cluster) {
status := c.tracker.StatusAll()
for _, v := range status {
Expand Down Expand Up @@ -451,7 +453,7 @@ func TestClustersPin(t *testing.T) {
}
delay()
delay()

delay()
funpinned := func(t *testing.T, c *Cluster) {
status := c.tracker.StatusAll()
if l := len(status); l != 0 {
Expand Down Expand Up @@ -605,6 +607,7 @@ func TestClustersSyncLocal(t *testing.T) {
clusters[0].Pin(api.PinCid(h2))
pinDelay()
pinDelay()
pinDelay()

f := func(t *testing.T, c *Cluster) {
info, err := c.SyncLocal(h)
Expand Down Expand Up @@ -808,6 +811,7 @@ func TestClustersRecover(t *testing.T) {
t.Error("GlobalPinInfo should be for testrCid2")
}

pinDelay()
for _, c := range clusters {
inf, ok := ginfo.PeerMap[c.host.ID()]
if !ok {
Expand Down

0 comments on commit f3b9b8a

Please sign in to comment.