diff options
| author | 2023-08-25 14:52:44 -0400 | |
|---|---|---|
| committer | 2023-08-25 16:25:57 -0400 | |
| commit | fd4fce73762ccb07dfa299dcf21209f7e83442da (patch) | |
| tree | 227758a99e8a78cc1acc95bfb5d042cadb10b51a /java | |
| parent | 4086599ddbde87cb7d7acc87dc2307f6df2458d6 (diff) | |
Disables failing tests in ChooserActionFactoryTest
Currently these tests pass because there is no assertion on the
return value of CountDownLatch.await(...)
Once added, both timeout consistently given any amount of time.
Bug: 297551329
Test: atest ChooserActionFactoryTest
Change-Id: I0775d29f1eb0dd639ef6108ccccf676dabde3e2f
Diffstat (limited to 'java')
| -rw-r--r-- | java/tests/src/com/android/intentresolver/ChooserActionFactoryTest.kt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/java/tests/src/com/android/intentresolver/ChooserActionFactoryTest.kt b/java/tests/src/com/android/intentresolver/ChooserActionFactoryTest.kt index af6e5f16..7f06e683 100644 --- a/java/tests/src/com/android/intentresolver/ChooserActionFactoryTest.kt +++ b/java/tests/src/com/android/intentresolver/ChooserActionFactoryTest.kt @@ -35,7 +35,9 @@ import java.util.concurrent.TimeUnit import java.util.function.Consumer import org.junit.After import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Before +import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.mockito.Mockito @@ -75,6 +77,7 @@ class ChooserActionFactoryTest { context.unregisterReceiver(testReceiver) } + @Ignore("b/297551329") @Test fun testCreateCustomActions() { val factory = createFactory() @@ -90,7 +93,7 @@ class ChooserActionFactoryTest { Mockito.verify(logger).logCustomActionSelected(eq(0)) assertEquals(Activity.RESULT_OK, resultConsumer.latestReturn) // Verify the pending intent has been called - countdown.await(500, TimeUnit.MILLISECONDS) + assertTrue("Timed out waiting for broadcast", countdown.await(2500, TimeUnit.MILLISECONDS)) } @Test @@ -100,6 +103,7 @@ class ChooserActionFactoryTest { assertThat(factory.modifyShareAction).isNull() } + @Ignore("b/297551329") @Test fun testModifyShareAction() { val factory = createFactory(includeModifyShare = true) @@ -107,11 +111,10 @@ class ChooserActionFactoryTest { val action = factory.modifyShareAction ?: error("Modify share action should not be null") action.onClicked.run() - Mockito.verify(logger) - .logActionSelected(eq(EventLog.SELECTION_TYPE_MODIFY_SHARE)) + Mockito.verify(logger).logActionSelected(eq(EventLog.SELECTION_TYPE_MODIFY_SHARE)) assertEquals(Activity.RESULT_OK, resultConsumer.latestReturn) // Verify the pending intent has been called - countdown.await(500, TimeUnit.MILLISECONDS) + assertTrue("Timed out waiting for broadcast", countdown.await(2500, TimeUnit.MILLISECONDS)) } @Test |