app/src/androidTest/java/org/andstatus/app/note/NoteEditorTest.java
/* We see crash in the test...
        java.lang.IllegalStateException: beginBroadcast() called while already in a broadcast
        at android.os.RemoteCallbackList.beginBroadcast(RemoteCallbackList.java:241)
        at com.android.server.clipboard.ClipboardService.setPrimaryClipInternal(ClipboardService.java:583)

        So we split clipboard copying functions into two tests
        ...but this doesn't help...
    */


So we split clipboard copying functions into two tests
but this doesn't help
So we split clipboard copying functions into two tests but this doesn ' t help
@Ignore("We see crash in the test...")
    @Test
    public void testContextMenuWhileEditing1() throws InterruptedException {
        final String method = "testContextMenuWhileEditing";
        TestSuite.waitForListLoaded(getActivity(), 2);
        ActivityTestHelper.openEditor(method, getActivity());
        ListScreenTestHelper<TimelineActivity> helper =
                new ListScreenTestHelper<>(getActivity(), ConversationActivity.class);
        long listItemId = helper.getListItemIdOfLoadedReply();
        String logMsg = "listItemId=" + listItemId;
        long noteId = TimelineType.HOME.showsActivities() ?
                MyQuery.activityIdToLongColumnValue(ActivityTable.NOTE_ID, listItemId) : listItemId;
        logMsg += ", noteId=" + noteId;
        String content = MyQuery.noteIdToStringColumnValue(NoteTable.CONTENT, noteId);
        helper.invokeContextMenuAction4ListItemId(method, listItemId, NoteContextMenuItem.COPY_TEXT, R.id.note_wrapper);
        assertEquals(logMsg, content, getClipboardText(method));
   }
@ Ignore ( "We see crash in the test..." ) @ Test public void testContextMenuWhileEditing1 ( ) throws InterruptedException { final String method = "testContextMenuWhileEditing" ; TestSuite . waitForListLoaded ( getActivity ( ) , 2 ) ; ActivityTestHelper . openEditor ( method , getActivity ( ) ) ; ListScreenTestHelper < TimelineActivity > helper = new ListScreenTestHelper < > ( getActivity ( ) , ConversationActivity . class ) ; long listItemId = helper . getListItemIdOfLoadedReply ( ) ; String logMsg = "listItemId=" + listItemId ; long noteId = TimelineType . HOME . showsActivities ( ) ? MyQuery . activityIdToLongColumnValue ( ActivityTable . NOTE_ID , listItemId ) : listItemId ; logMsg += ", noteId=" + noteId ; String content = MyQuery . noteIdToStringColumnValue ( NoteTable . CONTENT , noteId ) ; helper . invokeContextMenuAction4ListItemId ( method , listItemId , NoteContextMenuItem . COPY_TEXT , R . id . note_wrapper ) ; assertEquals ( logMsg , content , getClipboardText ( method ) ) ; }
We see crash in the test...
java.lang.IllegalStateException: beginBroadcast() called while already in a broadcast
at android.os.RemoteCallbackList.beginBroadcast(RemoteCallbackList.java:241)
at com.android.server.clipboard.ClipboardService.setPrimaryClipInternal(ClipboardService.java:583)
We see crash in the test ... java . lang . IllegalStateException : beginBroadcast () called while already in a broadcast at android . os . RemoteCallbackList . beginBroadcast ( RemoteCallbackList . java : 241 ) at com . android . server . clipboard . ClipboardService . setPrimaryClipInternal ( ClipboardService . java : 583 )