From 031eb15a28848605aa13172e27ed1334b09d52ea Mon Sep 17 00:00:00 2001 From: web3-bot Date: Fri, 16 Jul 2021 17:45:56 +0000 Subject: [PATCH 1/7] disable Travis --- .travis.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a156d3e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -os: - - linux - -language: go - -go: - - 1.13.x - -env: - global: - - GOTFLAGS="-race" - matrix: - - BUILD_DEPTYPE=gomod - - -# disable travis install -install: - - true - -script: - - bash <(curl -s https://raw.githubusercontent.com/ipfs/ci-helpers/master/travis-ci/run-standard-tests.sh) - - -cache: - directories: - - $GOPATH/pkg/mod - - $HOME/.cache/go-build - -notifications: - email: false From c3436ed15ffe8c6368c6c359a03ebf4d5ef07875 Mon Sep 17 00:00:00 2001 From: web3-bot Date: Fri, 16 Jul 2021 17:46:00 +0000 Subject: [PATCH 2/7] add .github/workflows/automerge.yml --- .github/workflows/automerge.yml | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/automerge.yml diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000..32bcc2e --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,51 @@ +# File managed by web3-bot. DO NOT EDIT. +# See https://github.com/protocol/.github/ for details. + +# Automatically merge pull requests opened by web3-bot, as soon as (and only if) all tests pass. +# This reduces the friction associated with updating with our workflows. + +on: [ pull_request ] +name: Automerge + +jobs: + automerge-check: + if: github.event.pull_request.user.login == 'web3-bot' + runs-on: ubuntu-latest + outputs: + status: ${{ steps.should-automerge.outputs.status }} + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Check if we should automerge + id: should-automerge + run: | + for commit in $(git rev-list --first-parent origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }}); do + committer=$(git show --format=$'%ce' -s $commit) + echo "Committer: $committer" + if [[ "$committer" != "web3-bot@users.noreply.github.com" ]]; then + echo "Commit $commit wasn't committed by web3-bot, but by $committer." + echo "::set-output name=status::false" + exit + fi + done + echo "::set-output name=status::true" + automerge: + needs: automerge-check + runs-on: ubuntu-latest + if: ${{ needs.automerge-check.outputs.status == 'true' }} + steps: + - name: Wait on tests + uses: lewagon/wait-on-check-action@bafe56a6863672c681c3cf671f5e10b20abf2eaa # v0.2 + with: + ref: ${{ github.event.pull_request.head.sha }} + repo-token: ${{ secrets.GITHUB_TOKEN }} + wait-interval: 10 + running-workflow-name: 'automerge' # the name of this job + - name: Merge PR + uses: pascalgn/automerge-action@741c311a47881be9625932b0a0de1b0937aab1ae # v0.13.1 + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + MERGE_LABELS: "" + MERGE_METHOD: "squash" + MERGE_DELETE_BRANCH: true From 96cc3e6c4f8239ab851debb905dea51fe2283c7f Mon Sep 17 00:00:00 2001 From: web3-bot Date: Fri, 16 Jul 2021 17:46:00 +0000 Subject: [PATCH 3/7] add .github/workflows/go-test.yml --- .github/workflows/go-test.yml | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/go-test.yml diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml new file mode 100644 index 0000000..4c7138b --- /dev/null +++ b/.github/workflows/go-test.yml @@ -0,0 +1,47 @@ +# File managed by web3-bot. DO NOT EDIT. +# See https://github.com/protocol/.github/ for details. + +on: [push, pull_request] +name: Go Test + +jobs: + unit: + strategy: + fail-fast: false + matrix: + os: [ "ubuntu", "windows", "macos" ] + go: [ "1.15.x", "1.16.x" ] + runs-on: ${{ matrix.os }}-latest + name: ${{ matrix.os}} (go ${{ matrix.go }}) + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + - name: Go information + run: | + go version + go env + - name: Run tests + uses: protocol/multiple-go-modules@v1.0 + with: + run: go test -v -coverprofile coverage.txt ./... + - name: Run tests (32 bit) + if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX. + uses: protocol/multiple-go-modules@v1.0 + env: + GOARCH: 386 + with: + run: go test -v ./... + - name: Run tests with race detector + if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow + uses: protocol/multiple-go-modules@v1.0 + with: + run: go test -v -race ./... + - name: Upload coverage to Codecov + uses: codecov/codecov-action@a1ed4b322b4b38cb846afb5a0ebfa17086917d27 # v1.5.0 + with: + file: coverage.txt + env_vars: OS=${{ matrix.os }}, GO=${{ matrix.go }} From 8fdf7888b2ee5087ab10ca49d8abb4470e1cc50f Mon Sep 17 00:00:00 2001 From: web3-bot Date: Fri, 16 Jul 2021 17:46:00 +0000 Subject: [PATCH 4/7] add .github/workflows/go-check.yml --- .github/workflows/go-check.yml | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/go-check.yml diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml new file mode 100644 index 0000000..00ce947 --- /dev/null +++ b/.github/workflows/go-check.yml @@ -0,0 +1,50 @@ +# File managed by web3-bot. DO NOT EDIT. +# See https://github.com/protocol/.github/ for details. + +on: [push, pull_request] +name: Go Checks + +jobs: + unit: + runs-on: ubuntu-latest + name: All + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - uses: actions/setup-go@v2 + with: + go-version: "1.16.x" + - name: Install staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@434f5f3816b358fe468fa83dcba62d794e7fe04b # 2021.1 (v0.2.0) + - name: Check that go.mod is tidy + uses: protocol/multiple-go-modules@v1.0 + with: + run: | + go mod tidy + if [[ -n $(git ls-files --other --exclude-standard --directory -- go.sum) ]]; then + echo "go.sum was added by go mod tidy" + exit 1 + fi + git diff --exit-code -- go.sum go.mod + - name: gofmt + if: ${{ success() || failure() }} # run this step even if the previous one failed + run: | + out=$(gofmt -s -l .) + if [[ -n "$out" ]]; then + echo $out | awk '{print "::error file=" $0 ",line=0,col=0::File is not gofmt-ed."}' + exit 1 + fi + - name: go vet + if: ${{ success() || failure() }} # run this step even if the previous one failed + uses: protocol/multiple-go-modules@v1.0 + with: + run: go vet ./... + - name: staticcheck + if: ${{ success() || failure() }} # run this step even if the previous one failed + uses: protocol/multiple-go-modules@v1.0 + with: + run: | + set -o pipefail + staticcheck ./... | sed -e 's@\(.*\)\.go@./\1.go@g' + From 99836f05e798011391019a0144bd836134ee8aec Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 16 Jul 2021 10:58:29 -0700 Subject: [PATCH 5/7] test: use leveldb instead of badger Badger has issues on 32bit operating systems. --- pstoreds/addr_book_gc_test.go | 10 +++++----- pstoreds/ds_test.go | 9 +++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pstoreds/addr_book_gc_test.go b/pstoreds/addr_book_gc_test.go index e21f43f..82e5127 100644 --- a/pstoreds/addr_book_gc_test.go +++ b/pstoreds/addr_book_gc_test.go @@ -43,7 +43,7 @@ func TestGCLookahead(t *testing.T) { opts.GCLookaheadInterval = 10 * time.Second opts.GCPurgeInterval = 1 * time.Second - factory := addressBookFactory(t, badgerStore, opts) + factory := addressBookFactory(t, leveldbStore, opts) ab, closeFn := factory() gc := ab.(*dsAddrBook).gc defer closeFn() @@ -90,7 +90,7 @@ func TestGCPurging(t *testing.T) { opts.GCLookaheadInterval = 20 * time.Second opts.GCPurgeInterval = 1 * time.Second - factory := addressBookFactory(t, badgerStore, opts) + factory := addressBookFactory(t, leveldbStore, opts) ab, closeFn := factory() gc := ab.(*dsAddrBook).gc defer closeFn() @@ -157,7 +157,7 @@ func TestGCDelay(t *testing.T) { opts.GCLookaheadInterval = 1 * time.Minute opts.GCPurgeInterval = 30 * time.Second - factory := addressBookFactory(t, badgerStore, opts) + factory := addressBookFactory(t, leveldbStore, opts) ab, closeFn := factory() defer closeFn() @@ -188,7 +188,7 @@ func TestGCLookaheadDisabled(t *testing.T) { opts.GCLookaheadInterval = 0 // disable lookahead opts.GCPurgeInterval = 9 * time.Hour - factory := addressBookFactory(t, badgerStore, opts) + factory := addressBookFactory(t, leveldbStore, opts) ab, closeFn := factory() defer closeFn() @@ -232,7 +232,7 @@ func BenchmarkLookaheadCycle(b *testing.B) { opts.GCLookaheadInterval = 2 * time.Hour opts.GCPurgeInterval = 6 * time.Hour - factory := addressBookFactory(b, badgerStore, opts) + factory := addressBookFactory(b, leveldbStore, opts) ab, closeFn := factory() defer closeFn() diff --git a/pstoreds/ds_test.go b/pstoreds/ds_test.go index 8727077..9287e53 100644 --- a/pstoreds/ds_test.go +++ b/pstoreds/ds_test.go @@ -18,8 +18,8 @@ import ( type datastoreFactory func(tb testing.TB) (ds.Batching, func()) var dstores = map[string]datastoreFactory{ - "Badger": badgerStore, - // "Leveldb": leveldbStore, + //"Badger": badgerStore, + "Leveldb": leveldbStore, } func TestDsPeerstore(t *testing.T) { @@ -87,6 +87,8 @@ func BenchmarkDsPeerstore(b *testing.B) { } } +// Doesn't work on 32bit because badger. +//lint:ignore U1000 disabled for now func badgerStore(tb testing.TB) (ds.Batching, func()) { dataPath, err := ioutil.TempDir(os.TempDir(), "badger") if err != nil { @@ -103,8 +105,7 @@ func badgerStore(tb testing.TB) (ds.Batching, func()) { return store, closer } -//lint:ignore U1000 disabled for now -func leveldbStore(tb testing.TB) (ds.TxnDatastore, func()) { +func leveldbStore(tb testing.TB) (ds.Batching, func()) { dataPath, err := ioutil.TempDir(os.TempDir(), "leveldb") if err != nil { tb.Fatal(err) From 501bfa8154bad1b290cec375cad7daa40cffa92f Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 16 Jul 2021 15:03:35 -0700 Subject: [PATCH 6/7] chore: update libp2p-core ensures that peer record sequence numbers are atomic --- go.mod | 2 +- go.sum | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/go.mod b/go.mod index f32bdd2..90c5aa4 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/ipfs/go-ds-leveldb v0.4.2 github.com/ipfs/go-log v1.0.5 github.com/libp2p/go-buffer-pool v0.0.2 - github.com/libp2p/go-libp2p-core v0.5.4 + github.com/libp2p/go-libp2p-core v0.8.6 github.com/multiformats/go-base32 v0.0.3 github.com/multiformats/go-multiaddr v0.3.3 github.com/multiformats/go-multiaddr-fmt v0.1.0 diff --git a/go.sum b/go.sum index bb5d221..d384bcd 100644 --- a/go.sum +++ b/go.sum @@ -59,7 +59,6 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/ipfs/go-cid v0.0.5/go.mod h1:plgt+Y5MnOey4vO4UlUazGqdbEXuFYitED67FexhXog= github.com/ipfs/go-cid v0.0.7 h1:ysQJVJA3fNDF1qigJbsSQOdjhVLsOEoPdh0+R97k3jY= github.com/ipfs/go-cid v0.0.7/go.mod h1:6Ux9z5e+HpkQdckYoX1PG/6xqKspzlEIR5SDmgqgC/I= github.com/ipfs/go-datastore v0.4.1/go.mod h1:SX/xMIKoCszPqp+z9JhPYCmoOoXTvaa13XEbGtsFUhA= @@ -94,16 +93,15 @@ github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfn github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/libp2p/go-buffer-pool v0.0.1/go.mod h1:xtyIz9PMobb13WaxR6Zo1Pd1zXJKYg0a8KiIvDp3TzQ= github.com/libp2p/go-buffer-pool v0.0.2 h1:QNK2iAFa8gjAe1SPz6mHSMuCcjs+X1wlHzeOSqcmlfs= github.com/libp2p/go-buffer-pool v0.0.2/go.mod h1:MvaB6xw5vOrDl8rYZGLFdKAuk/hRoRZd1Vi32+RXyFM= github.com/libp2p/go-flow-metrics v0.0.3/go.mod h1:HeoSNUrOJVK1jEpDqVEiUOIXqhbnS27omG0uWU5slZs= -github.com/libp2p/go-libp2p-core v0.5.4 h1:Z8Tt3R5or2pkl3Wgywfcc0GCNjf18aYWA30OjBpbmRs= -github.com/libp2p/go-libp2p-core v0.5.4/go.mod h1:uN7L2D4EvPCvzSH5SrhR72UWbnSGpt5/a35Sm4upn4Y= +github.com/libp2p/go-libp2p-core v0.8.6 h1:3S8g006qG6Tjpj1JdRK2S+TWc2DJQKX/RG9fdLeiLSU= +github.com/libp2p/go-libp2p-core v0.8.6/go.mod h1:dgHr0l0hIKfWpGpqAMbpo19pen9wJfdCGv51mTmdpmM= github.com/libp2p/go-maddr-filter v0.1.0/go.mod h1:VzZhTXkMucEGGEOSKddrwGiOv0tUhgnKqNEmIAz/bPU= -github.com/libp2p/go-msgio v0.0.4/go.mod h1:63lBBgOTDKQL6EWazRMCwXsEeEeK9O2Cd+0+6OOuipQ= -github.com/libp2p/go-openssl v0.0.4 h1:d27YZvLoTyMhIN4njrkr8zMDOM4lfpHIp6A+TK9fovg= -github.com/libp2p/go-openssl v0.0.4/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= +github.com/libp2p/go-msgio v0.0.6/go.mod h1:4ecVB6d9f4BDSL5fqvPiC4A3KivjWn+Venn/1ALLMWA= +github.com/libp2p/go-openssl v0.0.7 h1:eCAzdLejcNVBzP/iZM9vqHnQm+XyCEbSSIheIPRGNsw= +github.com/libp2p/go-openssl v0.0.7/go.mod h1:unDrJpgy3oFr+rqXsarWifmJuNnJR4chtO1HmaZjggc= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0OXOcUbGjvZxxijuBwbbmlSxLiuofa+g= github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ= @@ -123,13 +121,11 @@ github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL github.com/multiformats/go-base36 v0.1.0 h1:JR6TyF7JjGd3m6FbLU2cOxhC0Li8z8dLNGQ89tUg4F4= github.com/multiformats/go-base36 v0.1.0/go.mod h1:kFGE83c6s80PklsHO9sRn2NCoffoRdUUOENyW/Vv6sM= github.com/multiformats/go-multiaddr v0.1.1/go.mod h1:aMKBKNEYmzmDmxfX88/vz+J5IU55txyt0p4aiWVohjo= -github.com/multiformats/go-multiaddr v0.2.1/go.mod h1:s/Apk6IyxfvMjDafnhJgJ3/46z7tZ04iMk5wP4QMGGE= github.com/multiformats/go-multiaddr v0.2.2/go.mod h1:NtfXiOtHvghW9KojvtySjH5y0u0xW5UouOmQQrn6a3Y= github.com/multiformats/go-multiaddr v0.3.3 h1:vo2OTSAqnENB2rLk79pLtr+uhj+VAzSe3uef5q0lRSs= github.com/multiformats/go-multiaddr v0.3.3/go.mod h1:lCKNGP1EQ1eZ35Za2wlqnabm9xQkib3fyB+nZXHLag0= github.com/multiformats/go-multiaddr-fmt v0.1.0 h1:WLEFClPycPkp4fnIzoFoV9FVd49/eQsuaL3/CWe167E= github.com/multiformats/go-multiaddr-fmt v0.1.0/go.mod h1:hGtDIW4PU4BqJ50gW2quDuPVjyWNZxToGUh/HwTZYJo= -github.com/multiformats/go-multibase v0.0.1/go.mod h1:bja2MqRZ3ggyXtZSEDKpl0uO/gviWFaSteVbWT51qgs= github.com/multiformats/go-multibase v0.0.3 h1:l/B6bJDQjvQ5G52jw4QGSYeOTZoAwIO77RblWplfIqk= github.com/multiformats/go-multibase v0.0.3/go.mod h1:5+1R4eQrT3PkYZ24C3W2Ue2tPwIdYQD509ZjSb5y9Oc= github.com/multiformats/go-multihash v0.0.8/go.mod h1:YSLudS+Pi8NHE7o6tb3D8vrpKa63epEDmG8nTduyAew= @@ -137,7 +133,6 @@ github.com/multiformats/go-multihash v0.0.13/go.mod h1:VdAWLKTwram9oKAatUcLxBNUj github.com/multiformats/go-multihash v0.0.14/go.mod h1:VdAWLKTwram9oKAatUcLxBNUjdtcVwxObEQBtRfuyjc= github.com/multiformats/go-multihash v0.0.15 h1:hWOPdrNqDjwHDx82vsYGSDZNyktOJJ2dzZJzFkOV1jM= github.com/multiformats/go-multihash v0.0.15/go.mod h1:D6aZrWNLFTV/ynMpKsNtB40mJzmCl4jb1alC0OvHiHg= -github.com/multiformats/go-varint v0.0.2/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.5/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= github.com/multiformats/go-varint v0.0.6 h1:gk85QWKxh3TazbLxED/NlDVv8+q+ReFJk7Y2W/KhfNY= github.com/multiformats/go-varint v0.0.6/go.mod h1:3Ls8CIEsrijN6+B7PbrXRPxHRPuXSrVKRY101jdMZYE= @@ -180,7 +175,7 @@ github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1/go.mod h github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= From 0b07f5573137ef82f0394009035516df1c8d395f Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 16 Jul 2021 15:22:15 -0700 Subject: [PATCH 7/7] test: make tests less timing dependent --- test/addr_book_suite.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/addr_book_suite.go b/test/addr_book_suite.go index 8de071f..98b76aa 100644 --- a/test/addr_book_suite.go +++ b/test/addr_book_suite.go @@ -123,8 +123,8 @@ func testAddAddress(ab pstore.AddrBook) func(*testing.T) { // 1 second left ab.AddAddrs(id, addrs, 3*time.Second) // 3 seconds left - time.Sleep(2 * time.Second) - // 1 seconds left. + time.Sleep(1 * time.Second) + // 2 seconds left. // We still have the address. AssertAddressesEqual(t, addrs, ab.Addrs(id)) @@ -246,7 +246,7 @@ func testUpdateTTLs(m pstore.AddrBook) func(t *testing.T) { AssertAddressesEqual(t, addrs2, m.Addrs(ids[1])) // After a wait, addrs[0] is gone. - time.Sleep(1500 * time.Millisecond) + time.Sleep(2 * time.Second) AssertAddressesEqual(t, addrs1[1:2], m.Addrs(ids[0])) AssertAddressesEqual(t, addrs2, m.Addrs(ids[1])) @@ -257,7 +257,7 @@ func testUpdateTTLs(m pstore.AddrBook) func(t *testing.T) { AssertAddressesEqual(t, addrs1[1:2], m.Addrs(ids[0])) AssertAddressesEqual(t, addrs2, m.Addrs(ids[1])) - time.Sleep(1500 * time.Millisecond) + time.Sleep(2 * time.Second) // First addrs is gone in both. AssertAddressesEqual(t, addrs1[1:], m.Addrs(ids[0]))