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
7
7
import androidx.test.filters.MediumTest
8
8
import androidx.test.platform.app.InstrumentationRegistry
9
9
import com.adevinta.android.barista.assertion.BaristaVisibilityAssertions.assertContains
10
+ import com.adevinta.android.barista.interaction.BaristaSleepInteractions.sleep
10
11
import com.fasterxml.jackson.databind.ObjectMapper
11
12
import java.net.ConnectException
12
13
import java.net.InetSocketAddress
@@ -78,6 +79,7 @@ class ConnectionErrorTest :
78
79
this [Preferences ::host.name] = " unknown"
79
80
})
80
81
setupActivity(config)
82
+ app.mqttConnectionIdlingResource.use { Espresso .onIdle() }
81
83
assertContains(R .id.connectedStatusMessage, R .string.statusEndpointStateMessageUnknownHost)
82
84
}
83
85
}
@@ -238,6 +240,7 @@ private fun Broker.use(block: () -> Unit) {
238
240
Timber .i(" Test MQTT Broker listening on port ${this .port} " )
239
241
} catch (e: ConnectException ) {
240
242
Timber .i(" broker not listening on ${this .port} yet" )
243
+ listening = false
241
244
Thread .sleep(5000 )
242
245
}
243
246
}
You can’t perform that action at this time.
0 commit comments