mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Reduce noise of flaky test.
This commit is contained in:
committed by
mtang-signal
parent
627b939326
commit
630875dae2
@@ -4,9 +4,12 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import junit.framework.Assert.assertFalse
|
||||
import junit.framework.Assert.assertTrue
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.signal.core.util.concurrent.SignalExecutors
|
||||
import org.thoughtcrime.securesms.testing.SignalFlakyTest
|
||||
import org.thoughtcrime.securesms.testing.SignalFlakyTestRule
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.atomic.AtomicBoolean
|
||||
|
||||
@@ -18,6 +21,9 @@ class SQLiteDatabaseTest {
|
||||
|
||||
private lateinit var db: SQLiteDatabase
|
||||
|
||||
@get:Rule
|
||||
val flakyTestRule = SignalFlakyTestRule()
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
db = SignalDatabase.instance!!.signalWritableDatabase
|
||||
@@ -181,6 +187,7 @@ class SQLiteDatabaseTest {
|
||||
assertTrue(hasRun2.get())
|
||||
}
|
||||
|
||||
@SignalFlakyTest
|
||||
@Test
|
||||
fun runPostSuccessfulTransaction_runsAfterMainTransactionInNestedTransaction() {
|
||||
val hasRun1 = AtomicBoolean(false)
|
||||
|
||||
Reference in New Issue
Block a user