@@ -912,7 +912,7 @@ const discoveryFixture = Effect.fn("discoveryFixture")(function* () {
912912 ? { simulators : [ ] , emulators : [ ] }
913913 : {
914914 simulators : [ ] ,
915- emulators : hubDevices . slice ( 1 ) ,
915+ emulators : [ ] ,
916916 errors : [
917917 {
918918 message : "[apple-utils] Failed to run `xcrun simctl list devices --json`:" ,
@@ -975,7 +975,7 @@ it.effect(
975975
976976 hub . mode = "simctl_failed" ;
977977 const failed = yield * service . list ;
978- expect ( failed . devices ) . toEqual ( listed ) ;
978+ expect ( failed . devices ) . toEqual ( listed . filter ( ( device ) => device . platform === "ios" ) ) ;
979979 expect ( failed . hostStatuses [ LOCAL_DEVICE_HOST_ID ] ) . toEqual ( {
980980 status : "ready" ,
981981 detail : "[apple-utils] Failed to run `xcrun simctl list devices --json`:" ,
@@ -988,30 +988,27 @@ it.effect(
988988 } ) . pipe ( Effect . provide ( ServerSettings . layerTest ( { enableDeviceSupport : true } ) ) , Effect . scoped ) ,
989989) ;
990990
991- it . effect (
992- "waits past the hub's own simctl timeout and keeps devices when the hub never answers" ,
993- ( ) =>
994- Effect . gen ( function * ( ) {
995- const { service, hub, listed } = yield * discoveryFixture ( ) ;
996- yield * service . list ;
991+ it . effect ( "keeps devices with a warning when the hub never answers within 40 seconds" , ( ) =>
992+ Effect . gen ( function * ( ) {
993+ const { service, hub, listed } = yield * discoveryFixture ( ) ;
994+ yield * service . list ;
997995
998- hub . mode = "hung" ;
999- const listing = yield * service . list . pipe ( Effect . forkScoped ) ;
1000- yield * Deferred . await ( hub . requested ) ;
1001- yield * TestClock . adjust ( "40 seconds" ) ;
1002- const timedOut = yield * Fiber . join ( listing ) ;
1003- expect ( timedOut . devices ) . toEqual ( listed ) ;
1004- expect ( timedOut . hostStatuses [ LOCAL_DEVICE_HOST_ID ] ) . toEqual ( {
1005- status : "ready" ,
1006- detail :
1007- "The device hub did not answer within 40 seconds. Devices found earlier stay listed." ,
1008- } ) ;
996+ hub . mode = "hung" ;
997+ const listing = yield * service . list . pipe ( Effect . forkScoped ) ;
998+ yield * Deferred . await ( hub . requested ) ;
999+ yield * TestClock . adjust ( "40 seconds" ) ;
1000+ const timedOut = yield * Fiber . join ( listing ) ;
1001+ expect ( timedOut . devices ) . toEqual ( listed ) ;
1002+ expect ( timedOut . hostStatuses [ LOCAL_DEVICE_HOST_ID ] ) . toEqual ( {
1003+ status : "ready" ,
1004+ detail : "The device hub did not answer within 40 seconds. Devices found earlier stay listed." ,
1005+ } ) ;
10091006
1010- hub . mode = "listed" ;
1011- const recovered = yield * service . list ;
1012- expect ( recovered . devices ) . toEqual ( listed ) ;
1013- expect ( recovered . hostStatuses [ LOCAL_DEVICE_HOST_ID ] ) . toEqual ( { status : "ready" } ) ;
1014- } ) . pipe ( Effect . provide ( ServerSettings . layerTest ( { enableDeviceSupport : true } ) ) , Effect . scoped ) ,
1007+ hub . mode = "listed" ;
1008+ const recovered = yield * service . list ;
1009+ expect ( recovered . devices ) . toEqual ( listed ) ;
1010+ expect ( recovered . hostStatuses [ LOCAL_DEVICE_HOST_ID ] ) . toEqual ( { status : "ready" } ) ;
1011+ } ) . pipe ( Effect . provide ( ServerSettings . layerTest ( { enableDeviceSupport : true } ) ) , Effect . scoped ) ,
10151012) ;
10161013
10171014it . effect ( "retry keeps device and agent consent unchanged" , ( ) =>
0 commit comments