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

This commit is contained in:
matst80
2024-11-13 23:12:09 +01:00
parent 0a0fd1738c
commit 78abef7d73
4 changed files with 36 additions and 5 deletions

View File

@@ -13,18 +13,25 @@ func TestConnection(t *testing.T) {
Id: id,
storageMessages: []Message{},
Items: []*CartItem{},
Deliveries: make([]CartDelivery, 0),
TotalPrice: 0,
}, nil
})
hg, err := NewGrainHandler(localPool, ":1337")
if err != nil {
t.Errorf("Error creating handler: %v\n", err)
}
if hg == nil {
t.Errorf("Expected handler, got nil")
}
pool, err := NewSyncedPool(localPool, "127.0.0.1", nil)
if err != nil {
t.Errorf("Error creating pool: %v", err)
}
time.Sleep(400 * time.Millisecond)
pool.AddRemote("127.0.0.1")
err = pool.AddRemote("127.0.0.1")
if err != nil {
t.Errorf("Error adding remote: %v", err)
}
go pool.Negotiate()
data, err := pool.Get(ToCartId("kalle"))