Files
go-cart-actor/packet-queue_test.go
matst80 c5bc17c44d
All checks were successful
Build and Publish / BuildAndDeploy (push) Successful in 1m52s
update stuff
2024-11-10 23:05:24 +01:00

29 lines
544 B
Go

package main
import (
"testing"
"time"
)
func TestQueue(t *testing.T) {
localPool := NewGrainLocalPool(100, time.Minute, func(id CartId) (*CartGrain, error) {
return &CartGrain{
Id: id,
storageMessages: []Message{},
Items: []*CartItem{},
TotalPrice: 0,
}, nil
})
pool, err := NewSyncedPool(localPool, "localhost", nil)
if err != nil {
t.Errorf("Error creating pool: %v", err)
}
err = pool.AddRemote("localhost")
if err != nil {
t.Errorf("Error adding remote: %v", err)
return
}
}