@@ -326,7 +326,7 @@ struct DefaultRoomLifecycleManagerTests {
326326 } ,
327327
328328 // This is so that the RETRY operation’s wait-to-become-ATTACHED succeeds
329- subscribeToStateBehavior: . addSubscriptionAndEmitStateChange (
329+ subscribeToStateBehavior: . addSubscriptionAndEmitEvent (
330330 . init(
331331 current: . attached,
332332 previous: . detached, // arbitrary
@@ -954,7 +954,7 @@ struct DefaultRoomLifecycleManagerTests {
954954 attachBehavior: . success, // Not related to this test, just so that the subsequent CHA-RL5f attachment cycle completes
955955
956956 // Not related to this test, just so that the subsequent CHA-RL5d wait-for-ATTACHED completes
957- subscribeToStateBehavior: . addSubscriptionAndEmitStateChange (
957+ subscribeToStateBehavior: . addSubscriptionAndEmitEvent (
958958 . init(
959959 current: . attached,
960960 previous: . attaching, // arbitrary
@@ -1003,7 +1003,7 @@ struct DefaultRoomLifecycleManagerTests {
10031003 attachBehavior: . success, // Not related to this test, just so that the subsequent CHA-RL5f attachment cycle completes
10041004
10051005 // Not related to this test, just so that the subsequent CHA-RL5d wait-for-ATTACHED completes
1006- subscribeToStateBehavior: . addSubscriptionAndEmitStateChange (
1006+ subscribeToStateBehavior: . addSubscriptionAndEmitEvent (
10071007 . init(
10081008 current: . attached,
10091009 previous: . attaching, // arbitrary
@@ -1134,7 +1134,7 @@ struct DefaultRoomLifecycleManagerTests {
11341134 reason: contributorFailedReason
11351135 )
11361136
1137- return . addSubscriptionAndEmitStateChange ( contributorFailedStateChange)
1137+ return . addSubscriptionAndEmitEvent ( contributorFailedStateChange)
11381138 }
11391139 } ) ( )
11401140 ) ,
@@ -1204,7 +1204,7 @@ struct DefaultRoomLifecycleManagerTests {
12041204 reason: nil // arbitrary
12051205 )
12061206
1207- return . addSubscriptionAndEmitStateChange ( contributorAttachedStateChange)
1207+ return . addSubscriptionAndEmitEvent ( contributorAttachedStateChange)
12081208 }
12091209 } ) ( )
12101210 ) ,
@@ -1241,7 +1241,7 @@ struct DefaultRoomLifecycleManagerTests {
12411241 let contributors = [
12421242 createContributor (
12431243 attachBehavior: . success,
1244- subscribeToStateBehavior: . addSubscriptionAndEmitStateChange (
1244+ subscribeToStateBehavior: . addSubscriptionAndEmitEvent (
12451245 . init(
12461246 current: . attached,
12471247 previous: . attaching, // arbitrary
@@ -1289,7 +1289,7 @@ struct DefaultRoomLifecycleManagerTests {
12891289 createContributor (
12901290 attachBehavior: . success,
12911291 detachBehavior: . success, // So that the detach performed by CHA-RL1h5’s triggered RUNDOWN succeeds
1292- subscribeToStateBehavior: . addSubscriptionAndEmitStateChange (
1292+ subscribeToStateBehavior: . addSubscriptionAndEmitEvent (
12931293 . init(
12941294 current: . attached,
12951295 previous: . attaching, // arbitrary
@@ -1434,7 +1434,7 @@ struct DefaultRoomLifecycleManagerTests {
14341434 )
14351435
14361436 await waitForManager ( manager, toHandleContributorStateChange: previousContributorStateChange) {
1437- contributor. mockChannel. emitStateChange ( previousContributorStateChange)
1437+ contributor. mockChannel. emitEvent ( previousContributorStateChange)
14381438 }
14391439
14401440 // When: This contributor emits an UPDATE event with `resumed` flag set to true
@@ -1447,7 +1447,7 @@ struct DefaultRoomLifecycleManagerTests {
14471447 )
14481448
14491449 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1450- contributor. mockChannel. emitStateChange ( contributorStateChange)
1450+ contributor. mockChannel. emitEvent ( contributorStateChange)
14511451 }
14521452
14531453 // Then: The manager does not record a pending discontinuity event for this contributor, nor does it call `emitDiscontinuity` on the contributor; this shows us that the actions described in CHA-RL4a3 and CHA-RL4a4 haven’t been performed
@@ -1472,7 +1472,7 @@ struct DefaultRoomLifecycleManagerTests {
14721472 )
14731473
14741474 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1475- contributor. mockChannel. emitStateChange ( contributorStateChange)
1475+ contributor. mockChannel. emitEvent ( contributorStateChange)
14761476 }
14771477
14781478 // Then: The manager does not record a pending discontinuity event for this contributor, nor does it call `emitDiscontinuity` on the contributor; this shows us that the actions described in CHA-RL4a3 and CHA-RL4a4 haven’t been performed
@@ -1501,7 +1501,7 @@ struct DefaultRoomLifecycleManagerTests {
15011501 )
15021502
15031503 await waitForManager ( manager, toHandleContributorStateChange: previousContributorStateChange) {
1504- contributor. mockChannel. emitStateChange ( previousContributorStateChange)
1504+ contributor. mockChannel. emitEvent ( previousContributorStateChange)
15051505 }
15061506
15071507 // When: This contributor emits an UPDATE event with `resumed` flag set to false
@@ -1514,7 +1514,7 @@ struct DefaultRoomLifecycleManagerTests {
15141514 )
15151515
15161516 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1517- contributor. mockChannel. emitStateChange ( contributorStateChange)
1517+ contributor. mockChannel. emitEvent ( contributorStateChange)
15181518 }
15191519
15201520 // Then: The manager records a pending discontinuity event for this contributor, and this discontinuity event has error equal to the contributor UPDATE event’s `reason`
@@ -1547,7 +1547,7 @@ struct DefaultRoomLifecycleManagerTests {
15471547 )
15481548
15491549 await waitForManager ( manager, toHandleContributorStateChange: previousContributorStateChange) {
1550- contributor. mockChannel. emitStateChange ( previousContributorStateChange)
1550+ contributor. mockChannel. emitEvent ( previousContributorStateChange)
15511551 }
15521552
15531553 // When: The aforementioned contributor emits an UPDATE event with `resumed` flag set to false
@@ -1560,7 +1560,7 @@ struct DefaultRoomLifecycleManagerTests {
15601560 )
15611561
15621562 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1563- contributor. mockChannel. emitStateChange ( contributorStateChange)
1563+ contributor. mockChannel. emitEvent ( contributorStateChange)
15641564 }
15651565
15661566 // Then: The manager does not replace the existing pending discontinuity event for this contributor
@@ -1589,7 +1589,7 @@ struct DefaultRoomLifecycleManagerTests {
15891589 )
15901590
15911591 await waitForManager ( manager, toHandleContributorStateChange: previousContributorStateChange) {
1592- contributor. mockChannel. emitStateChange ( previousContributorStateChange)
1592+ contributor. mockChannel. emitEvent ( previousContributorStateChange)
15931593 }
15941594
15951595 // When: This contributor emits an UPDATE event with `resumed` flag set to false
@@ -1602,7 +1602,7 @@ struct DefaultRoomLifecycleManagerTests {
16021602 )
16031603
16041604 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1605- contributor. mockChannel. emitStateChange ( contributorStateChange)
1605+ contributor. mockChannel. emitEvent ( contributorStateChange)
16061606 }
16071607
16081608 // Then: The manager calls `emitDiscontinuity` on the contributor, with error equal to the contributor UPDATE event’s `reason`
@@ -1634,7 +1634,7 @@ struct DefaultRoomLifecycleManagerTests {
16341634 )
16351635
16361636 await waitForManager ( manager, toHandleContributorStateChange: previousContributorStateChange) {
1637- contributor. mockChannel. emitStateChange ( previousContributorStateChange)
1637+ contributor. mockChannel. emitEvent ( previousContributorStateChange)
16381638 }
16391639
16401640 // This is to put the manager into the DETACHING state, to satisfy "with a room lifecycle operation in progress"
@@ -1654,7 +1654,7 @@ struct DefaultRoomLifecycleManagerTests {
16541654 )
16551655
16561656 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1657- contributor. mockChannel. emitStateChange ( contributorStateChange)
1657+ contributor. mockChannel. emitEvent ( contributorStateChange)
16581658 }
16591659
16601660 // Then: The manager records a pending discontinuity event for this contributor, and this discontinuity event has error equal to the contributor ATTACHED event’s `reason`
@@ -1685,7 +1685,7 @@ struct DefaultRoomLifecycleManagerTests {
16851685 )
16861686
16871687 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1688- contributor. mockChannel. emitStateChange ( contributorStateChange)
1688+ contributor. mockChannel. emitEvent ( contributorStateChange)
16891689 }
16901690
16911691 // Then: The manager does not record a pending discontinuity event for this contributor
@@ -1725,7 +1725,7 @@ struct DefaultRoomLifecycleManagerTests {
17251725 )
17261726
17271727 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1728- contributors [ 0 ] . mockChannel. emitStateChange ( contributorStateChange)
1728+ contributors [ 0 ] . mockChannel. emitEvent ( contributorStateChange)
17291729 }
17301730
17311731 // Then:
@@ -1763,7 +1763,7 @@ struct DefaultRoomLifecycleManagerTests {
17631763 )
17641764
17651765 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1766- contributor. mockChannel. emitStateChange ( contributorStateChange)
1766+ contributor. mockChannel. emitEvent ( contributorStateChange)
17671767 }
17681768
17691769 // Then: It does not set a new transient disconnect timeout
@@ -1799,7 +1799,7 @@ struct DefaultRoomLifecycleManagerTests {
17991799 async let maybeClockSleepArgument = clock. sleepCallArgumentsAsyncSequence. first { _ in true }
18001800
18011801 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1802- contributor. mockChannel. emitStateChange ( contributorStateChange)
1802+ contributor. mockChannel. emitEvent ( contributorStateChange)
18031803 }
18041804
18051805 // Then: The manager records a 5 second transient disconnect timeout for this contributor
@@ -1852,7 +1852,7 @@ struct DefaultRoomLifecycleManagerTests {
18521852 )
18531853
18541854 await waitForManager ( manager, toHandleContributorStateChange: contributorAttachedStateChange) {
1855- contributorThatWillEmitAttachedStateChange. mockChannel. emitStateChange ( contributorAttachedStateChange)
1855+ contributorThatWillEmitAttachedStateChange. mockChannel. emitEvent ( contributorAttachedStateChange)
18561856 }
18571857
18581858 // Then: The manager clears any transient disconnect timeout for that contributor
@@ -1883,7 +1883,7 @@ struct DefaultRoomLifecycleManagerTests {
18831883 async let maybeClockSleepArgument = clock. sleepCallArgumentsAsyncSequence. first { _ in true }
18841884 // We create a transient disconnect timeout by fulfilling the conditions of CHA-RL4b7
18851885 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1886- contributor. mockChannel. emitStateChange ( contributorStateChange)
1886+ contributor. mockChannel. emitEvent ( contributorStateChange)
18871887 }
18881888 try #require( await maybeClockSleepArgument != nil )
18891889
@@ -1898,7 +1898,7 @@ struct DefaultRoomLifecycleManagerTests {
18981898 )
18991899
19001900 await waitForManager ( manager, toHandleTransientDisconnectTimeoutWithID: transientDisconnectTimeoutID) {
1901- contributor. mockChannel. emitStateChange ( contributorAttachedStateChange)
1901+ contributor. mockChannel. emitEvent ( contributorAttachedStateChange)
19021902 }
19031903
19041904 // Then: The manager’s status remains unchanged. In particular, it has not changed to ATTACHING, meaning that the CHA-RL4b7 side effect has not happened and hence that the transient disconnect timeout was properly cancelled
@@ -1932,7 +1932,7 @@ struct DefaultRoomLifecycleManagerTests {
19321932 resumed: false // arbitrary
19331933 )
19341934
1935- contributors [ 0 ] . mockChannel. emitStateChange ( contributorStateChange)
1935+ contributors [ 0 ] . mockChannel. emitEvent ( contributorStateChange)
19361936
19371937 // Then: The room status transitions to ATTACHED
19381938 _ = try #require( await maybeAttachedRoomStatusChange)
@@ -1964,7 +1964,7 @@ struct DefaultRoomLifecycleManagerTests {
19641964 )
19651965
19661966 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
1967- contributors [ 0 ] . mockChannel. emitStateChange ( contributorStateChange)
1967+ contributors [ 0 ] . mockChannel. emitEvent ( contributorStateChange)
19681968 }
19691969
19701970 // Then: The room status does not change
@@ -1979,7 +1979,7 @@ struct DefaultRoomLifecycleManagerTests {
19791979 attachBehavior: . success, // So the CHA-RL5f RETRY attachment cycle succeeds
19801980
19811981 // This is so that the RETRY operation’s wait-to-become-ATTACHED succeeds
1982- subscribeToStateBehavior: . addSubscriptionAndEmitStateChange (
1982+ subscribeToStateBehavior: . addSubscriptionAndEmitEvent (
19831983 . init(
19841984 current: . attached,
19851985 previous: . detached, // arbitrary
@@ -2029,7 +2029,7 @@ struct DefaultRoomLifecycleManagerTests {
20292029 )
20302030
20312031 await waitForManager ( manager, toHandleContributorStateChange: contributorStateChange) {
2032- contributorThatWillEmitStateChange. mockChannel. emitStateChange ( contributorStateChange)
2032+ contributorThatWillEmitStateChange. mockChannel. emitEvent ( contributorStateChange)
20332033 }
20342034
20352035 // Then:
0 commit comments