diff --git a/tests/src/com/android/email/mail/store/ImapStoreUnitTests.java b/tests/src/com/android/email/mail/store/ImapStoreUnitTests.java index b7ecd0fe8..9379d78d2 100644 --- a/tests/src/com/android/email/mail/store/ImapStoreUnitTests.java +++ b/tests/src/com/android/email/mail/store/ImapStoreUnitTests.java @@ -1207,11 +1207,19 @@ public class ImapStoreUnitTests extends InstrumentationTestCase { ImapMessage message = prepareForAppendTest(mock, "OK Success"); + // First try w/o parenthesis + mock.expectLiterally( + getNextTag(false) + " UID SEARCH HEADER MESSAGE-ID ", + new String[] { + "* sEARCH 321", + getNextTag(true) + " oK success" + }); + // If that fails, then try w/ parenthesis mock.expectLiterally( getNextTag(false) + " UID SEARCH (HEADER MESSAGE-ID )", new String[] { - "* sEARCH 321", - getNextTag(true) + " oK success" + "* sEARCH 321", + getNextTag(true) + " oK success" }); mFolder.appendMessages(new Message[] {message}); @@ -1233,12 +1241,19 @@ public class ImapStoreUnitTests extends InstrumentationTestCase { ImapMessage message = prepareForAppendTest(mock, "NO No space left on the server."); assertEquals("initial uid", message.getUid()); - + // First try w/o parenthesis + mock.expectLiterally( + getNextTag(false) + " UID SEARCH HEADER MESSAGE-ID ", + new String[] { + "* sEARCH", // not found + getNextTag(true) + " oK Search completed." + }); + // If that fails, then try w/ parenthesis mock.expectLiterally( getNextTag(false) + " UID SEARCH (HEADER MESSAGE-ID )", new String[] { - "* sEARCH", // not found - getNextTag(true) + " oK Search completed." + "* sEARCH", // not found + getNextTag(true) + " oK Search completed." }); mFolder.appendMessages(new Message[] {message});