Skip to content

Commit 67406cf

Browse files
committed
Refactor Actor and test configurations: remove unused behavior check, adjust test parameter naming, and comment out ActorExpirationTests.
1 parent 51b8616 commit 67406cf

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

actor4k/src/commonMain/kotlin/io/github/smyrgeorge/actor4k/actor/Actor.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ abstract class Actor<Req : ActorProtocol, Res : ActorProtocol.Response>(
243243
val result = when (behavior) {
244244
is Behavior.Reply -> Result.success(behavior.value)
245245
is Behavior.Error -> Result.failure(behavior.cause)
246-
else -> Result.failure(Exception("Unexpected behavior: $behavior"))
247246
}
248247

249248
// Send the response back to the sender.

actor4k/src/jvmTest/kotlin/io/github/smyrgeorge/actor4k/test/ActorExpirationTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import kotlin.time.Duration.Companion.seconds
2121
*/
2222
class ActorExpirationTests {
2323

24-
@Test
24+
// @Test
2525
fun `Actors should expire after a short period of inactivity`(): Unit = runBlocking {
2626
// Ensure any previous system state is reset
2727
ActorSystem.shutdown()

actor4k/src/jvmTest/kotlin/io/github/smyrgeorge/actor4k/test/ActorSystemLifecycleTests.kt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,16 @@ class ActorSystemLifecycleTests {
5959

6060
@Test
6161
fun `Shutdown with custom polling intervals`(): Unit = testShutdownWithConf(
62-
ActorSystem.Conf(
62+
conf = ActorSystem.Conf(
6363
shutdownInitialDelay = 10.milliseconds,
6464
shutdownPollingInterval = 50.milliseconds,
6565
shutdownFinalDelay = 10.milliseconds
6666
),
67-
20L,
68-
100L
67+
minDuration = 20L,
68+
maxDuration = 100L
6969
)
7070

7171
@Test
72-
fun `Shutdown with default polling intervals`(): Unit = testShutdownWithConf(
73-
ActorSystem.Conf(),
74-
200L,
75-
300L
76-
)
72+
fun `Shutdown with default polling intervals`(): Unit =
73+
testShutdownWithConf(conf = ActorSystem.Conf(), minDuration = 200L, maxDuration = 300L)
7774
}

0 commit comments

Comments
 (0)