@@ -205,11 +205,12 @@ func TestLoadConfiguration(t *testing.T) {
205205}
206206
207207func TestLoadPluginReferences (t * testing.T ) {
208+ ctx := context .Background ()
208209 theConfig , err := LoadConfig ([]byte (successConfigText ), "" )
209210 if err != nil {
210211 t .Fatalf ("LoadConfig returned unexpected error: %v" , err )
211212 }
212- handle := utils .NewTestHandle ()
213+ handle := utils .NewTestHandle (ctx )
213214 err = LoadPluginReferences (theConfig .Plugins , handle )
214215 if err != nil {
215216 t .Fatalf ("LoadPluginReferences returned unexpected error: %v" , err )
@@ -227,15 +228,15 @@ func TestLoadPluginReferences(t *testing.T) {
227228 if err != nil {
228229 t .Fatalf ("LoadConfig returned unexpected error: %v" , err )
229230 }
230- err = LoadPluginReferences (theConfig .Plugins , utils .NewTestHandle ())
231+ err = LoadPluginReferences (theConfig .Plugins , utils .NewTestHandle (ctx ))
231232 if err == nil {
232233 t .Fatalf ("LoadPluginReferences did not return the expected error" )
233234 }
234235}
235236
236237func TestInstantiatePlugin (t * testing.T ) {
237238 plugSpec := configapi.PluginSpec {Type : "plover" }
238- _ , err := instantiatePlugin (plugSpec , utils .NewTestHandle ())
239+ _ , err := instantiatePlugin (plugSpec , utils .NewTestHandle (context . Background () ))
239240 if err == nil {
240241 t .Fatalf ("InstantiatePlugin did not return the expected error" )
241242 }
@@ -286,6 +287,8 @@ func TestLoadSchedulerConfig(t *testing.T) {
286287
287288 registerNeededPlgugins ()
288289
290+ ctx := context .Background ()
291+
289292 for _ , test := range tests {
290293 theConfig , err := LoadConfig ([]byte (test .configText ), "" )
291294 if err != nil {
@@ -294,7 +297,7 @@ func TestLoadSchedulerConfig(t *testing.T) {
294297 }
295298 t .Fatalf ("LoadConfig returned unexpected error: %v" , err )
296299 }
297- handle := utils .NewTestHandle ()
300+ handle := utils .NewTestHandle (ctx )
298301 err = LoadPluginReferences (theConfig .Plugins , handle )
299302 if err != nil {
300303 if test .wantErr {
0 commit comments