Skip to content

Commit

Permalink
Remove broken panic handler
Browse files Browse the repository at this point in the history
This handler would recover any arbitrary panic and make the test pass.
This is a big anti-pattern since it means we can have many failing tests
we don't know about and things are silently broken potentially.

Running against CI to test the fallout of this.

Signed-off-by: Dirkjan Bussink <[email protected]>
  • Loading branch information
dbussink committed Dec 9, 2024
1 parent 9b71606 commit 3674b21
Show file tree
Hide file tree
Showing 98 changed files with 0 additions and 98 deletions.
1 change: 0 additions & 1 deletion go/test/endtoend/backup/vtbackup/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/cellalias/cell_alias_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/clustertest/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/keyspace/keyspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/messaging/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/mysqlctl/mysqlctl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/mysqlctld/mysqlctld_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/mysqlserver/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ END;
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

// setting grpc max size
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/onlineddl/flow/onlineddl_flow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ const (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/onlineddl/revert/onlineddl_revert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ type revertibleTestCase struct {
}

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ func waitForMessage(t *testing.T, uuid string, messageSubstring string) {
}

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/onlineddl/vrepl/onlineddl_vrepl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ const (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ func nextOpOrder() int64 {
}

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ func mysqlParams() *mysql.ConnParams {
}

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ const (

// Use $VREPL_SUITE_TEST_FILTER environment variable to filter tests by name.
func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

testsFilter = os.Getenv(testFilterEnvVar)
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/preparestmt/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/recovery/pitr/shardedpitr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ var (
// - asserting that restoring to restoreTime2 (going from 2 shards to 2 shards with past time) is working, it will assert for both shards
// - asserting that restoring to restoreTime3 is working, we should get complete data after restoring, as we have in existing shards.
func TestPITRRecovery(t *testing.T) {
defer cluster.PanicHandler(nil)
initializeCluster(t)
defer clusterInstance.Teardown()

Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/recovery/unshardedrecovery/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ var (

// TestMainImpl creates cluster for unsharded recovery testing.
func TestMainImpl(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/reparent/prscomplex/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/reparent/prssettingspool/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/sharded/sharded_keyspace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/stress/stress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/tabletgateway/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/tabletmanager/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/tabletmanager/primary/tablet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/tabletmanager/tablegc/tablegc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/topoconncache/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ Topology: We create a keyspace with two shards , having 3 tablets each. Primarie
to 'zone1' and replicas/rdonly belongs to cell2.
*/
func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/topotest/consul/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ CREATE TABLE t1 (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/topotest/etcd2/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ CREATE TABLE t1 (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/topotest/zk2/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ CREATE TABLE t1 (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/transaction/restart/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/transaction/single/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/transaction/twopc/fuzz/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/transaction/twopc/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/transaction/twopc/metric/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/transaction/twopc/stress/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/transaction/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/utils/mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)

exitCode := func() int {
clusterInstance = cluster.NewCluster(cell, "localhost")
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/utils/mysqlvsvitess/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)

exitCode := func() int {
clusterInstance = cluster.NewCluster(cell, "localhost")
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/vault/vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ var (
)

func TestVaultAuth(t *testing.T) {
defer cluster.PanicHandler(nil)

// Instantiate Vitess Cluster objects and start topo
initializeClusterEarly(t)
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/versionupgrade/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ var (

// TestMain is the main entry point
func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitcode, err := func() (int, error) {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/vtadmin/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ create table u_b
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/vtgate/concurrentdml/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ INSERT INTO t1_seq (id, next_id, cache) values(0, 1, 1000);
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/vtgate/connectiondrain/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()
os.Exit(m.Run())
}
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/vtgate/consolidator/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
1 change: 0 additions & 1 deletion go/test/endtoend/vtgate/createdb_plugin/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ var (
)

func TestMain(m *testing.M) {
defer cluster.PanicHandler(nil)
flag.Parse()

exitCode := func() int {
Expand Down
Loading

0 comments on commit 3674b21

Please sign in to comment.