File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
project/app/src/androidTest/java/org/owntracks/android/ui Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
77import androidx.test.filters.MediumTest
88import androidx.test.platform.app.InstrumentationRegistry
99import com.adevinta.android.barista.assertion.BaristaVisibilityAssertions.assertContains
10+ import com.adevinta.android.barista.interaction.BaristaSleepInteractions.sleep
1011import com.fasterxml.jackson.databind.ObjectMapper
1112import java.net.ConnectException
1213import java.net.InetSocketAddress
@@ -78,6 +79,7 @@ class ConnectionErrorTest :
7879 this [Preferences ::host.name] = " unknown"
7980 })
8081 setupActivity(config)
82+ app.mqttConnectionIdlingResource.use { Espresso .onIdle() }
8183 assertContains(R .id.connectedStatusMessage, R .string.statusEndpointStateMessageUnknownHost)
8284 }
8385 }
@@ -238,6 +240,7 @@ private fun Broker.use(block: () -> Unit) {
238240 Timber .i(" Test MQTT Broker listening on port ${this .port} " )
239241 } catch (e: ConnectException ) {
240242 Timber .i(" broker not listening on ${this .port} yet" )
243+ listening = false
241244 Thread .sleep(5000 )
242245 }
243246 }
You can’t perform that action at this time.
0 commit comments