diff --git a/execution/Makefile b/execution/Makefile index 9f500dfb7e..5bf801f33e 100644 --- a/execution/Makefile +++ b/execution/Makefile @@ -6,6 +6,7 @@ test: .PHONY: test-quick test-quick: go test -count=1 ./... + go test -run=^$$ -bench=. -benchtime=1x ./... # updateTestFixtures will update all! golden fixtures .PHONY: updateTestFixtures diff --git a/execution/engine/execution_engine_test.go b/execution/engine/execution_engine_test.go index 31b67f7b57..e57567542c 100644 --- a/execution/engine/execution_engine_test.go +++ b/execution/engine/execution_engine_test.go @@ -4668,7 +4668,7 @@ func BenchmarkExecutionEngine(b *testing.B) { }, }, staticdatasource.Configuration{ - Data: `"world"`, + Data: `{"hello": "world"}`, }, ) require.NoError(b, err) @@ -4679,9 +4679,8 @@ func BenchmarkExecutionEngine(b *testing.B) { }) engineConf.SetFieldConfigurations([]plan.FieldConfiguration{ { - TypeName: "Query", - FieldName: "hello", - DisableDefaultMapping: true, + TypeName: "Query", + FieldName: "hello", }, }) @@ -4725,7 +4724,9 @@ func BenchmarkExecutionEngine(b *testing.B) { for pb.Next() { bc := pool.Get().(*benchCase) bc.writer.Reset() - _ = bc.engine.Execute(ctx, &req, bc.writer) + if err := bc.engine.Execute(ctx, &req, bc.writer); err != nil { + b.Fatal(err) + } pool.Put(bc) } }) diff --git a/v2/Makefile b/v2/Makefile index 99bba14c1a..bd8413275b 100644 --- a/v2/Makefile +++ b/v2/Makefile @@ -11,7 +11,7 @@ test-stability: .PHONY: test-quick test-quick: go test ./... - go test -run=xxxx -bench=. -benchtime=1x ./... + go test -run=^$$ -bench=. -benchtime=1x ./... clean-testcache: go clean -testcache diff --git a/v2/pkg/engine/datasource/staticdatasource/static_datasource_test.go b/v2/pkg/engine/datasource/staticdatasource/static_datasource_test.go index bdd36430f9..c6ea27abcc 100644 --- a/v2/pkg/engine/datasource/staticdatasource/static_datasource_test.go +++ b/v2/pkg/engine/datasource/staticdatasource/static_datasource_test.go @@ -24,7 +24,7 @@ func TestStaticDataSourcePlanning(t *testing.T) { Fetch: &resolve.SingleFetch{ DataSourceIdentifier: []byte("staticdatasource.Source"), FetchConfiguration: resolve.FetchConfiguration{ - Input: "world", + Input: `{"hello": "world"}`, DataSource: Source{}, }, }, @@ -35,6 +35,7 @@ func TestStaticDataSourcePlanning(t *testing.T) { { Name: []byte("hello"), Value: &resolve.String{ + Path: []string{"hello"}, Nullable: true, }, }, @@ -57,7 +58,7 @@ func TestStaticDataSourcePlanning(t *testing.T) { }, }, Configuration{ - Data: "world", + Data: `{"hello": "world"}`, }, ) require.NoError(t, err) @@ -66,9 +67,8 @@ func TestStaticDataSourcePlanning(t *testing.T) { }, Fields: []plan.FieldConfiguration{ { - TypeName: "Query", - FieldName: "hello", - DisableDefaultMapping: true, + TypeName: "Query", + FieldName: "hello", }, }, DisableResolveFieldPositions: true,