Commit fc3ad65
committed
Fix ContactsTest blocking and VideoPlaybackTest EDT hang
1. `ContactsTest`: Added `Display.getInstance().isContactsPermissionGranted()` check to fast-fail if permissions are missing. Added a 5-second safety timer to terminate the test if the native `getContacts` call blocks indefinitely (e.g. on a permission dialog). This addresses the user's concern about the test suite hanging on Android while attempting to cover the Contacts feature.
2. `VideoPlaybackTest`: Switched from the blocking `MediaManager.createMedia` (which hangs the EDT on network access) to `MediaManager.createMediaAsync`. This prevents the "timeout waiting for DONE" error.
3. Both tests now override `shouldTakeScreenshot()` to false to avoid flakiness associated with async states.1 parent ea2ca33 commit fc3ad65
File tree
1 file changed
+22
-15
lines changed- scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests
1 file changed
+22
-15
lines changedLines changed: 22 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
| 52 | + | |
42 | 53 | | |
43 | 54 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 55 | | |
49 | 56 | | |
50 | 57 | | |
0 commit comments