slaskit
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 28s
Build and Publish / BuildAndDeploy (push) Successful in 2m23s

This commit is contained in:
matst80
2024-11-13 08:58:40 +01:00
parent c9a7113e12
commit 3615d2d7d1
4 changed files with 19 additions and 4 deletions

View File

@@ -16,12 +16,12 @@ func TestConnection(t *testing.T) {
TotalPrice: 0,
}, nil
})
pool, err := NewSyncedPool(localPool, "localhost", nil)
pool, err := NewSyncedPool(localPool, "127.0.0.1", nil)
if err != nil {
t.Errorf("Error creating pool: %v", err)
}
err = pool.AddRemote("localhost")
err = pool.AddRemote("127.0.0.1")
if err != nil {
t.Errorf("Error adding remote: %v", err)
}
@@ -35,5 +35,11 @@ func TestConnection(t *testing.T) {
t.Errorf("Expected data, got nil")
}
time.Sleep(2 * time.Millisecond)
data, err = pool.Get(ToCartId("kalle"))
if err != nil {
t.Errorf("Error getting data: %v", err)
}
if data == nil {
t.Errorf("Expected data, got nil")
}
}