Skip to content

Commit ef42300

Browse files
committed
Add logs to debug tests
1 parent bc07f53 commit ef42300

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/test/kotlin/eu/openanalytics/shinyproxyoperator/helpers/AwaitableEvenController.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ package eu.openanalytics.shinyproxyoperator.helpers
2222

2323
import eu.openanalytics.shinyproxyoperator.IEventController
2424
import eu.openanalytics.shinyproxyoperator.model.ShinyProxyInstance
25+
import io.github.oshai.kotlinlogging.KotlinLogging
2526
import kotlinx.coroutines.CompletableDeferred
2627

2728

2829
class AwaitableEvenController : IEventController {
2930

31+
private val logger = KotlinLogging.logger { }
32+
3033
private val listeners = Listener<String>()
3134
private val deleteListeners = Listener<Unit>()
3235
private val newInstanceListeners = Listener<ShinyProxyInstance>()
@@ -42,11 +45,13 @@ class AwaitableEvenController : IEventController {
4245
}
4346

4447
suspend fun waitForNewInstance(hash: String, revision: Int = 0): ShinyProxyInstance {
48+
logger.info { "--> waiting for NewInstance: hash: $hash, revision: $revision" }
4549
return newInstanceListeners.add(hash, revision).awaitWithTimeout()
4650
}
4751

4852
override fun createNewInstanceEvent(shinyProxyInstance: ShinyProxyInstance) {
4953
delegate.createNewInstanceEvent(shinyProxyInstance)
54+
logger.info { "<-- event NewInstance: hash: ${shinyProxyInstance.hashOfSpec}, revision: ${shinyProxyInstance.revision}" }
5055
newInstanceListeners.complete(shinyProxyInstance, shinyProxyInstance)
5156
}
5257

0 commit comments

Comments
 (0)