Updated 1k test

gql_cataclysm
noah metz 2023-10-30 01:42:36 -06:00
parent 39d3288094
commit dbe819fd05
1 changed files with 7 additions and 7 deletions

@ -68,7 +68,7 @@ func TestLink(t *testing.T) {
fatalErr(t, err) fatalErr(t, err)
} }
func Test1KLink(t *testing.T) { func Test10KLink(t *testing.T) {
ctx := lockableTestContext(t, []string{"test"}) ctx := lockableTestContext(t, []string{"test"})
l_pub, listener_key, err := ed25519.GenerateKey(rand.Reader) l_pub, listener_key, err := ed25519.GenerateKey(rand.Reader)
@ -88,18 +88,18 @@ func Test1KLink(t *testing.T) {
} }
reqs := make([]NodeID, 1000) reqs := make([]NodeID, 1000)
for i, _ := range(reqs) { for i := range(reqs) {
new_lockable := NewLockable() new_lockable := NewLockable()
reqs[i] = new_lockable.ID reqs[i] = new_lockable.ID
} }
ctx.Log.Logf("test", "CREATED_10K") ctx.Log.Logf("test", "CREATED_1K")
l_policy := NewAllNodesPolicy(Tree{ l_policy := NewAllNodesPolicy(Tree{
SerializedType(LockSignalType): nil, SerializedType(LockSignalType): nil,
}) })
listener := NewListenerExt(100000) listener := NewListenerExt(5000)
node, err := NewNode(ctx, listener_key, TestLockableType, 10000, []Policy{l_policy}, node, err := NewNode(ctx, listener_key, TestLockableType, 5000, []Policy{l_policy},
listener, listener,
NewLockableExt(reqs), NewLockableExt(reqs),
) )
@ -109,10 +109,10 @@ func Test1KLink(t *testing.T) {
lock_id, err := LockLockable(ctx, node) lock_id, err := LockLockable(ctx, node)
fatalErr(t, err) fatalErr(t, err)
_, err = WaitForResponse(listener.Chan, time.Second*20, lock_id) _, err = WaitForResponse(listener.Chan, time.Second*60, lock_id)
fatalErr(t, err) fatalErr(t, err)
ctx.Log.Logf("test", "LOCKED_10K") ctx.Log.Logf("test", "LOCKED_1K")
} }
func TestLock(t *testing.T) { func TestLock(t *testing.T) {