File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed
lib/src/androidTest/java/at/bitfire/cert4android Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -63,13 +63,16 @@ class UserDecisionRegistryTest {
6363 }
6464 }
6565 val results = Collections .synchronizedList(mutableListOf<Boolean >())
66- runBlocking {
67- repeat(5 ) {
68- launch(Dispatchers .Default ) {
69- results + = registry.check(testCert, this , getUserDecision)
66+ runBlocking(Dispatchers .Default ) {
67+ try {
68+ repeat(5 ) {
69+ launch {
70+ results + = registry.check(testCert, this , getUserDecision)
71+ }
7072 }
73+ } finally {
74+ canSendFeedback.release()
7175 }
72- canSendFeedback.release()
7376 }
7477 synchronized(registry.pendingDecisions) {
7578 assertFalse(registry.pendingDecisions.containsKey(testCert))
@@ -89,13 +92,16 @@ class UserDecisionRegistryTest {
8992 }
9093 }
9194 val results = Collections .synchronizedList(mutableListOf<Boolean >())
92- runBlocking {
93- repeat(5 ) {
94- launch(Dispatchers .Default ) {
95- results + = registry.check(testCert, this , getUserDecision)
95+ runBlocking(Dispatchers .Default ) {
96+ try {
97+ repeat(5 ) {
98+ launch {
99+ results + = registry.check(testCert, this , getUserDecision)
100+ }
96101 }
102+ } finally {
103+ canSendFeedback.release()
97104 }
98- canSendFeedback.release()
99105 }
100106 synchronized(registry.pendingDecisions) {
101107 assertFalse(registry.pendingDecisions.containsKey(testCert))
You can’t perform that action at this time.
0 commit comments