Skip to content

Commit

Permalink
VDiff2: Migrate VDiff1 Unit Tests (#11916)
Browse files Browse the repository at this point in the history
* Initial workflow differ tests

Signed-off-by: Matt Lord <mattalord@gmail.com>

* More tests

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Playing with vdiffEnv

Signed-off-by: Matt Lord <mattalord@gmail.com>

* more vdiffEnv work

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Use a shard testenv as it creates a vttestserver and mysqld instanc3

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Add vtctl client results/report tests

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Add TestVDiff to test full set of queries

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Finish up vtctl report building unit tests

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Deflake the unit tests in the CI

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Add TestVDiff2Sharded

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Minor changes after self review

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Reduce resource usage for race condition unit tests

We were creating a somewhat crazy number of resources.

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Fix data race in TestVDiff

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Correct Wrangler semaphore usage

Signed-off-by: Matt Lord <mattalord@gmail.com>

* Minor change after another self review

Signed-off-by: Matt Lord <mattalord@gmail.com>

Signed-off-by: Matt Lord <mattalord@gmail.com>
  • Loading branch information
mattlord authored Dec 27, 2022
1 parent 9cb518e commit 0479b6b
Show file tree
Hide file tree
Showing 16 changed files with 1,842 additions and 208 deletions.
10 changes: 10 additions & 0 deletions go/vt/vtctl/grpcvtctldserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ func NewVtctldServer(ts *topo.Server) *VtctldServer {
}
}

// NewTestVtctldServer returns a new VtctldServer for the given topo server
// AND tmclient for use in tests. This should NOT be used in production.
func NewTestVtctldServer(ts *topo.Server, tmc tmclient.TabletManagerClient) *VtctldServer {
return &VtctldServer{
ts: ts,
tmc: tmc,
ws: workflow.NewServer(ts, tmc),
}
}

func panicHandler(err *error) {
if x := recover(); x != nil {
*err = fmt.Errorf("uncaught panic: %v", x)
Expand Down
Loading

0 comments on commit 0479b6b

Please sign in to comment.