Skip to content

Commit

Permalink
ci: enable query engine tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GaoYusong committed Sep 5, 2024
1 parent c1b9ab5 commit 9e62a38
Show file tree
Hide file tree
Showing 9 changed files with 418 additions and 112 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- name: Build
run: go build -v

- name: Test Query Engine
run: go test -v -cover --timeout 120s .

- name: Test Binlog Replication
run: go test -v -p 1 --timeout 360s ./binlogreplication
21 changes: 19 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ go 1.22.4
require (
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/Shopify/toxiproxy/v2 v2.9.0
github.com/dolthub/doltgresql v0.11.1
github.com/dolthub/go-mysql-server v0.18.2-0.20240815142344-761713e36043
github.com/dolthub/vitess v0.0.0-20240807181005-71d735078e24
github.com/go-sql-driver/mysql v1.8.1
github.com/jmoiron/sqlx v1.4.0
github.com/lib/pq v1.10.9
github.com/marcboeker/go-duckdb v1.7.1
github.com/prometheus/client_golang v1.19.0
github.com/rs/zerolog v1.33.0
Expand All @@ -22,25 +24,37 @@ require (
github.com/apache/arrow/go/v17 v17.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/apd/v2 v2.0.3-0.20200518165714-d020e156310a // indirect
github.com/cockroachdb/errors v1.7.5 // indirect
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f // indirect
github.com/cockroachdb/redact v1.0.6 // indirect
github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 // indirect
github.com/dolthub/go-icu-regex v0.0.0-20230524105445-af7e7991c97e // indirect
github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 // indirect
github.com/dolthub/sqllogictest/go v0.0.0-20240618184124-ca47f9354216 // indirect
github.com/go-kit/kit v0.10.0 // indirect
github.com/goccy/go-json v0.10.3 // indirect
github.com/gocraft/dbr/v2 v2.7.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/geo v0.0.0-20200730024412-e86565bf3f35 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/flatbuffers v24.3.25+incompatible // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/lestrrat-go/strftime v1.0.4 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/pierrre/geohash v1.0.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
Expand All @@ -50,17 +64,20 @@ require (
github.com/rs/xid v1.5.0 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/tetratelabs/wazero v1.1.0 // indirect
github.com/twpayne/go-geom v1.3.6 // indirect
github.com/twpayne/go-kml v1.5.2-0.20200728095708-9f2fd4dfcbfe // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
go.opentelemetry.io/otel v1.7.0 // indirect
go.opentelemetry.io/otel/trace v1.7.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect
golang.org/x/mod v0.18.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/text v0.16.0 // indirect
golang.org/x/tools v0.22.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.34.2 // indirect
Expand Down
259 changes: 257 additions & 2 deletions go.sum

Large diffs are not rendered by default.

73 changes: 0 additions & 73 deletions iter_test.go

This file was deleted.

14 changes: 8 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,18 @@ func init() {
flag.StringVar(&dataDirectory, "datadir", dataDirectory, "The directory to store the database.")
}

func ensureSQLTranslate() {
_, err := translateWithSQLGlot("SELECT 1")
if err != nil {
panic(err)
}
}

func main() {
flag.Parse()
dbFilePath = filepath.Join(dataDirectory, dbFileName)

// start SQL translate service
err := startTranslationService()
if err != nil {
panic(err)
}
defer stopTranslationService()
ensureSQLTranslate()

provider, err := meta.NewDBProvider(dataDirectory, dbFileName)
if err != nil {
Expand Down
Loading

0 comments on commit 9e62a38

Please sign in to comment.