Skip to content

Commit 7b82473

Browse files
committed
fix: specify type parameters for SpeedTestQueueRunner and failureSnapshot
1 parent d35aa55 commit 7b82473

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

app/src/test/java/io/nekohasekai/sagernet/bg/proto/SpeedTestQueueRunnerTest.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ class SpeedTestQueueRunnerTest {
1414
val events = mutableListOf<String>()
1515
var active = 0
1616
var maximumActive = 0
17-
val runner = SpeedTestQueueRunner(
18-
sessionFactory = { profile ->
17+
val runner = SpeedTestQueueRunner<Long>(
18+
sessionFactory = { profile: Long ->
1919
fakeSession(
2020
run = { onSample ->
2121
active++
@@ -31,7 +31,9 @@ class SpeedTestQueueRunnerTest {
3131
},
3232
)
3333
},
34-
failureSnapshot = { profile, error -> snapshot(profile, true, error.message.orEmpty()) },
34+
failureSnapshot = { profile: Long, error: Exception ->
35+
snapshot(profile, true, error.message.orEmpty())
36+
},
3537
)
3638

3739
val results = runner.run(profiles) { _, _, _ -> }

0 commit comments

Comments
 (0)