@@ -465,6 +465,38 @@ func testModeIntegrated(ctx context.Context, net *NetworkHarness,
465465 )
466466}
467467
468+ // testCriticalTapStartupFailure ensures LiT exits quickly when a critical
469+ // integrated sub-server (tapd) fails to start during boot.
470+ func testCriticalTapStartupFailure (ctx context.Context , net * NetworkHarness ,
471+ t * harnessTest ) {
472+
473+ // Force tapd to bind to an invalid port to guarantee a startup failure
474+ // in integrated mode.
475+ node , err := net .NewNode (
476+ t .t , "FailFastTap" , nil , false , false ,
477+ "--taproot-assets.rpclisten=127.0.0.1:65536" ,
478+ )
479+ require .NoError (t .t , err )
480+
481+ defer func () {
482+ _ = net .ShutdownNode (node )
483+ }()
484+
485+ select {
486+ case procErr := <- net .ProcessErrors ():
487+ require .ErrorContains (t .t , procErr , "invalid port" )
488+ case <- time .After (15 * time .Second ):
489+ t .Fatalf ("expected tapd startup failure to be reported" )
490+ }
491+
492+ // LiT should terminate promptly after the critical startup failure.
493+ select {
494+ case <- node .processExit :
495+ case <- time .After (5 * time .Second ):
496+ t .Fatalf ("litd did not exit after tapd startup failure" )
497+ }
498+ }
499+
468500// integratedTestSuite makes sure that in integrated mode all daemons work
469501// correctly.
470502func integratedTestSuite (ctx context.Context , net * NetworkHarness , t * testing.T ,
0 commit comments