Skip to content

Commit

Permalink
Revert "Fix republisher test"
Browse files Browse the repository at this point in the history
This reverts commit 71d889c.
  • Loading branch information
hsanjuan committed Mar 2, 2018
1 parent 71d889c commit 20a57a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
3 changes: 2 additions & 1 deletion core/mock/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import (
"context"
"net"

testutil "gx/ipfs/QmVvkK7s5imCiq3JVbL3pGfnhcCnf3LrFJPF4GE2sAoGZf/go-testutil"

commands "github.com/ipfs/go-ipfs/commands"
core "github.com/ipfs/go-ipfs/core"
"github.com/ipfs/go-ipfs/repo"
config "github.com/ipfs/go-ipfs/repo/config"

mocknet "gx/ipfs/QmNh1kGFFdsPu79KNSaL4NUKUPb4Eiz4KHdMtFY6664RDp/go-libp2p/p2p/net/mock"
host "gx/ipfs/QmNmJZL7FQySMtE2BQuLMuZg2EB2CLEunJJUSVSc9YnnbV/go-libp2p-host"
testutil "gx/ipfs/QmVvkK7s5imCiq3JVbL3pGfnhcCnf3LrFJPF4GE2sAoGZf/go-testutil"
datastore "gx/ipfs/QmXRKBQA4wXP7xWbFiZsR1GP4HV6wMDQ1aWFxZZ4uBcPX9/go-datastore"
syncds "gx/ipfs/QmXRKBQA4wXP7xWbFiZsR1GP4HV6wMDQ1aWFxZZ4uBcPX9/go-datastore/sync"
pstore "gx/ipfs/QmXauCuJzmzapetmC6W4TuDJLL1yFFrVzSHoWv8YdbmnxH/go-libp2p-peerstore"
Expand Down
11 changes: 2 additions & 9 deletions namesys/republisher/repub_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,13 @@ func TestRepublish(t *testing.T) {
repub.Interval = time.Second
repub.RecordLifetime = time.Second * 5

// Publish in a way that would normally expire
err = rp.PublishWithEOL(ctx, publisher.PrivateKey, p, time.Now().Add(200*time.Millisecond))
if err != nil {
t.Fatal(err)
}

proc := goprocess.Go(repub.Run)
defer proc.Close()

// now wait a couple seconds
// now wait a couple seconds for it to fire
time.Sleep(time.Second * 2)

// we should be able to resolve them now because the republisher has
// kept the record live.
// we should be able to resolve them now
if err := verifyResolution(nodes, name, p); err != nil {
t.Fatal(err)
}
Expand Down

1 comment on commit 20a57a1

@GitCop
Copy link

@GitCop GitCop commented on 20a57a1 Mar 2, 2018

Choose a reason for hiding this comment

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

There were the following issues with your Pull Request

We ask for a few features in the commit message for Open Source licensing hygiene and commit message clarity.
git commit --amend can often help you quickly improve the commit message.
Guidelines and a script are available to help in the long run.
Your feedback on GitCop is welcome on this issue.


This message was auto-generated by https://gitcop.com

Please sign in to comment.