chore: eliminate all Kotlin compiler warnings in main source (#877)
* chore: eliminate all Kotlin compiler warnings in main source * test(chat): fix cross-class coroutine leaks poisoning the unit suite - ChatUpdateCommandTest: inject FakeSlashUsageStore — the real DataStore store inits on real IO threads with a relaxed-mock app (cacheDir NPE) and leaks an uncaught exception into the next runTest class. - ChatUpdateCommandTest + SlashCommandDispatchRpcTest: mock ProfileSwitchCoordinator.switched (ChatViewModelTest pattern) — VMs otherwise park collectors on the singleton flow that crash later classes (ProfileSwitchCoordinatorTest) on stale-Main resumption. Full suite: 944 tests, 0 failures (was 2 flaky per run). --------- Co-authored-by: M57 <hy4ri@users.noreply.github.com>
This commit is contained in:
1 parent
b05cffa9c4
commit
1e6e248891
14 files changed
+88
-38
No files matched your search
@@ -303,7 +303,7 @@ object HermesWsClient {
|
||||
}
|
||||
if (socketToCancel != null) {
|
||||
rejectAllPending()
|
||||
socketToCancel?.cancel()
|
||||
socketToCancel.cancel()
|
||||
}
|
||||
if (shouldOpen) openSocket()
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ class KanbanEventsClient {
|
||||
request,
|
||||
object : WebSocketListener() {
|
||||
override fun onOpen(
|
||||
ws: WebSocket,
|
||||
webSocket: WebSocket,
|
||||
response: Response,
|
||||
) {
|
||||
if (closed || gen != generation) return
|
||||
@@ -162,7 +162,7 @@ class KanbanEventsClient {
|
||||
}
|
||||
|
||||
override fun onMessage(
|
||||
ws: WebSocket,
|
||||
webSocket: WebSocket,
|
||||
text: String,
|
||||
) {
|
||||
if (closed || gen != generation) return
|
||||
@@ -173,20 +173,20 @@ class KanbanEventsClient {
|
||||
}
|
||||
|
||||
override fun onMessage(
|
||||
ws: WebSocket,
|
||||
webSocket: WebSocket,
|
||||
bytes: ByteString,
|
||||
) = Unit
|
||||
|
||||
override fun onClosing(
|
||||
ws: WebSocket,
|
||||
webSocket: WebSocket,
|
||||
code: Int,
|
||||
reason: String,
|
||||
) {
|
||||
ws.close(code, reason)
|
||||
webSocket.close(code, reason)
|
||||
}
|
||||
|
||||
override fun onClosed(
|
||||
ws: WebSocket,
|
||||
webSocket: WebSocket,
|
||||
code: Int,
|
||||
reason: String,
|
||||
) {
|
||||
@@ -199,7 +199,7 @@ class KanbanEventsClient {
|
||||
}
|
||||
|
||||
override fun onFailure(
|
||||
ws: WebSocket,
|
||||
webSocket: WebSocket,
|
||||
t: Throwable,
|
||||
response: Response?,
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user