Skip to content

Commit

Permalink
VStreamer Unit Tests: framework to remove the need to specify seriali…
Browse files Browse the repository at this point in the history
…zed strings in row events for unit tests (#14903)

Signed-off-by: Rohit Nayak <rohit@planetscale.com>
  • Loading branch information
rohit-nayak-ps authored Feb 16, 2024
1 parent daba1a0 commit 2929dee
Show file tree
Hide file tree
Showing 9 changed files with 862 additions and 406 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ require (
github.com/planetscale/pargzip v0.0.0-20201116224723-90c7fc03ea8a
github.com/planetscale/vtprotobuf v0.5.0
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/common v0.46.0 // indirect
github.com/prometheus/common v0.46.0
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
github.com/sjmudd/stopwatch v0.1.1
github.com/soheilhy/cmux v0.1.5
Expand Down
2 changes: 0 additions & 2 deletions go/cmd/vtadmin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,6 @@ func main() {
if err := rootCmd.Execute(); err != nil {
log.Fatal(err)
}

log.Flush()
}

type noopCloser struct{}
Expand Down
9 changes: 4 additions & 5 deletions go/vt/vtgate/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,12 @@ import (

"github.com/spf13/pflag"

"vitess.io/vitess/go/cache/theine"
"vitess.io/vitess/go/streamlog"
"vitess.io/vitess/go/vt/vtenv"
"vitess.io/vitess/go/vt/vthash"

"vitess.io/vitess/go/acl"
"vitess.io/vitess/go/cache/theine"
"vitess.io/vitess/go/mysql/collations"
"vitess.io/vitess/go/sqltypes"
"vitess.io/vitess/go/stats"
"vitess.io/vitess/go/streamlog"
"vitess.io/vitess/go/trace"
"vitess.io/vitess/go/vt/callerid"
"vitess.io/vitess/go/vt/key"
Expand All @@ -53,6 +50,7 @@ import (
"vitess.io/vitess/go/vt/srvtopo"
"vitess.io/vitess/go/vt/sysvars"
"vitess.io/vitess/go/vt/topo/topoproto"
"vitess.io/vitess/go/vt/vtenv"
"vitess.io/vitess/go/vt/vterrors"
"vitess.io/vitess/go/vt/vtgate/engine"
"vitess.io/vitess/go/vt/vtgate/evalengine"
Expand All @@ -62,6 +60,7 @@ import (
"vitess.io/vitess/go/vt/vtgate/vindexes"
"vitess.io/vitess/go/vt/vtgate/vschemaacl"
"vitess.io/vitess/go/vt/vtgate/vtgateservice"
"vitess.io/vitess/go/vt/vthash"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ func TestPlayerInvisibleColumns(t *testing.T) {
output := qh.Expect(tcases.output)
expectNontxQueries(t, output)
time.Sleep(1 * time.Second)
log.Flush()
if tcases.table != "" {
expectData(t, tcases.table, tcases.data)
}
Expand Down Expand Up @@ -3094,7 +3093,6 @@ func TestPlayerNoBlob(t *testing.T) {
output := qh.Expect(tcases.output)
expectNontxQueries(t, output)
time.Sleep(1 * time.Second)
log.Flush()
if tcases.table != "" {
expectData(t, tcases.table, tcases.data)
}
Expand Down Expand Up @@ -3333,7 +3331,6 @@ func TestPlayerBatchMode(t *testing.T) {
}
expectNontxQueries(t, output)
time.Sleep(1 * time.Second)
log.Flush()
if tcase.table != "" {
expectData(t, tcase.table, tcase.data)
}
Expand Down
Loading

0 comments on commit 2929dee

Please sign in to comment.