remove nil contexts from tests
@@ -112,7 +112,7 @@ func TestDriverStmtQueryContext(t *testing.T) {
dr := InstrumentSQLDriver(testDriver{}, testBuilder)
txn := app.StartTransaction("hello", nil, nil)
conn, _ := dr.Open("myhost,myport,mydatabase")
- stmt, _ := conn.(driver.ConnPrepareContext).PrepareContext(nil, "myoperation,mycollection")
+ stmt, _ := conn.(driver.ConnPrepareContext).PrepareContext(context.Background(), "myoperation,mycollection")
ctx := NewContext(context.Background(), txn)
stmt.(driver.StmtQueryContext).QueryContext(ctx, nil)
txn.End()
@@ -149,7 +149,7 @@ func TestDriverContext(t *testing.T) {
dr := InstrumentSQLDriver(testDriver{}, testBuilder)
txn := app.StartTransaction("hello", nil, nil)
connector, _ := dr.(driver.DriverContext).OpenConnector("myhost,myport,mydatabase")
- conn, _ := connector.Connect(nil)
+ conn, _ := connector.Connect(context.Background())
ctx := NewContext(context.Background(), txn)
conn.(driver.ExecerContext).ExecContext(ctx, "myoperation,mycollection", nil)
txn.End()
@@ -166,7 +166,7 @@ func TestInstrumentSQLConnector(t *testing.T) {
bld.BaseSegment.DatabaseName = "mydatabase"
connector := InstrumentSQLConnector(testConnector{}, bld)
txn := app.StartTransaction("hello", nil, nil)
- conn, _ := connector.Connect(nil)
+ conn, _ := connector.Connect(context.Background())
ctx := NewContext(context.Background(), txn)
conn.(driver.ExecerContext).ExecContext(ctx, "myoperation,mycollection", nil)
txn.End()
