Skip to content

Commit

Permalink
e2e: fix TestInteractions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Oct 31, 2024
1 parent bedaa10 commit 1266894
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions internal/test/e2e/interactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package e2e

import (
"context"
"errors"
"testing"
"time"

Expand Down Expand Up @@ -43,31 +42,6 @@ func TestInteractions(t *testing.T) {
t.Fatal("expected pt UID to be set")
}

// assert price table gets updated
var ptUpdates int
tt.Retry(100, 100*time.Millisecond, func() error {
// fetch the host
h, err := b.Host(context.Background(), h1.PublicKey())
tt.OK(err)

// make sure it did not get scanned again
if h.Interactions.TotalScans != ts {
t.Fatal("expected no new scans", h.Interactions.TotalScans, ts)
}

// keep track of pt updates
if h.PriceTable.UID != ptUID {
ptUID = h.PriceTable.UID
ptUpdates++
}

// assert the price table was updated
if ptUpdates < 2 {
return errors.New("price table should be updated from time to time")
}
return nil
})

// scan the host manually
tt.OKAll(b.ScanHost(context.Background(), h1.PublicKey(), 0))
time.Sleep(3 * testBusFlushInterval)
Expand Down

0 comments on commit 1266894

Please sign in to comment.