func testExecute2Panics(t *testing.T, conn tabletconn.TabletConn) { t.Log("testExecute2Panics") ctx := context.Background() if _, err := conn.Execute2(ctx, executeQuery, executeBindVars, executeTransactionID); err == nil || !strings.Contains(err.Error(), "caught test panic") { t.Fatalf("unexpected panic error: %v", err) } }
func testExecute2(t *testing.T, conn tabletconn.TabletConn) { ctx := context.Background() ctx = callerid.NewContext(ctx, testCallerID, testVTGateCallerID) qr, err := conn.Execute2(ctx, executeQuery, executeBindVars, executeTransactionID) if err != nil { t.Fatalf("Execute failed: %v", err) } if !reflect.DeepEqual(*qr, executeQueryResult) { t.Errorf("Unexpected result from Execute: got %v wanted %v", qr, executeQueryResult) } }
func testExecute2Error(t *testing.T, conn tabletconn.TabletConn) { t.Log("testExecute2Error") ctx := context.Background() _, err := conn.Execute2(ctx, executeQuery, executeBindVars, executeTransactionID) verifyError(t, err, "Execute") }