@@ -191,7 +191,7 @@ impl Runner {
191
191
}
192
192
}
193
193
194
- pub async fn run_validation ( self ) -> Result < Vec < RunnerResults > , String > {
194
+ pub async fn run_validation ( self ) -> Result < Vec < RunnerResults > , vector_common :: Error > {
195
195
// Initialize our test environment.
196
196
initialize_test_environment ( ) ;
197
197
@@ -251,7 +251,7 @@ impl Runner {
251
251
& self . configuration ,
252
252
& input_task_coordinator,
253
253
& output_task_coordinator,
254
- ) ;
254
+ ) ? ;
255
255
let input_tx = runner_input. into_sender ( controlled_edges. input ) ;
256
256
let output_rx = runner_output. into_receiver ( controlled_edges. output ) ;
257
257
debug ! ( "External resource (if any) and controlled edges built and spawned." ) ;
@@ -413,7 +413,7 @@ fn build_external_resource(
413
413
configuration : & ValidationConfiguration ,
414
414
input_task_coordinator : & TaskCoordinator < Configuring > ,
415
415
output_task_coordinator : & TaskCoordinator < Configuring > ,
416
- ) -> ( RunnerInput , RunnerOutput , Option < Encoder < encoding:: Framer > > ) {
416
+ ) -> Result < ( RunnerInput , RunnerOutput , Option < Encoder < encoding:: Framer > > ) , vector_common :: Error > {
417
417
let component_type = configuration. component_type ( ) ;
418
418
let maybe_external_resource = configuration. external_resource ( ) ;
419
419
let maybe_encoder = maybe_external_resource
@@ -430,15 +430,15 @@ fn build_external_resource(
430
430
maybe_external_resource. expect ( "a source must always have an external resource" ) ;
431
431
resource. spawn_as_input ( rx, input_task_coordinator) ;
432
432
433
- (
433
+ Ok ( (
434
434
RunnerInput :: External ( tx) ,
435
435
RunnerOutput :: Controlled ,
436
436
maybe_encoder,
437
- )
437
+ ) )
438
438
}
439
439
ComponentType :: Transform => {
440
440
// Transforms have no external resources.
441
- ( RunnerInput :: Controlled , RunnerOutput :: Controlled , None )
441
+ Ok ( ( RunnerInput :: Controlled , RunnerOutput :: Controlled , None ) )
442
442
}
443
443
ComponentType :: Sink => {
444
444
// As an external resource for a sink, we create a channel that the validation runner
@@ -448,13 +448,13 @@ fn build_external_resource(
448
448
let ( tx, rx) = mpsc:: channel ( 1024 ) ;
449
449
let resource =
450
450
maybe_external_resource. expect ( "a sink must always have an external resource" ) ;
451
- resource. spawn_as_output ( tx, output_task_coordinator) ;
451
+ resource. spawn_as_output ( tx, output_task_coordinator) ? ;
452
452
453
- (
453
+ Ok ( (
454
454
RunnerInput :: Controlled ,
455
455
RunnerOutput :: External ( rx) ,
456
456
maybe_encoder,
457
- )
457
+ ) )
458
458
}
459
459
}
460
460
}
0 commit comments