2023-06-25 20:20:59 -06:00
|
|
|
package graphvent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestGQLThread(t * testing.T) {
|
2023-06-25 21:00:00 -06:00
|
|
|
ctx := logTestContext(t, []string{"gqlws", "gql", "thread", "update"})
|
2023-06-25 20:20:59 -06:00
|
|
|
gql_thread, err := NewGQLThread(ctx, ":8080", []Lockable{}, ObjTypeMap{}, FieldMap{}, FieldMap{}, FieldMap{})
|
|
|
|
fatalErr(t, err)
|
|
|
|
|
|
|
|
test_thread, err := NewSimpleBaseThread(ctx, "Test thread 1", []Lockable{}, ThreadActions{}, ThreadHandlers{})
|
|
|
|
fatalErr(t, err)
|
|
|
|
|
|
|
|
err = LinkThreads(ctx, gql_thread, test_thread, nil)
|
|
|
|
fatalErr(t, err)
|
|
|
|
|
|
|
|
err = RunThread(ctx, gql_thread)
|
|
|
|
fatalErr(t, err)
|
|
|
|
}
|