This is an automated email from the ASF dual-hosted git repository. btellier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 055f274f75a727a87cb67f90a1a9f68231f5a39a Author: Tran Tien Duc <[email protected]> AuthorDate: Mon May 6 12:02:06 2019 +0700 JAMES-2756 SimpleMessageSearchIndex doesn't decode header values before searching --- .../mailbox/store/search/SimpleMessageSearchIndexTest.java | 5 +++++ .../mailbox/store/search/AbstractMessageSearchIndexTest.java | 12 ++++++++++++ mailbox/store/src/test/resources/eml/mail.eml | 2 +- mailbox/store/src/test/resources/eml/mail.json | 6 +++++- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/mailbox/scanning-search/src/test/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndexTest.java b/mailbox/scanning-search/src/test/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndexTest.java index 48ffb16..c383e35 100644 --- a/mailbox/scanning-search/src/test/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndexTest.java +++ b/mailbox/scanning-search/src/test/java/org/apache/james/mailbox/store/search/SimpleMessageSearchIndexTest.java @@ -238,4 +238,9 @@ public class SimpleMessageSearchIndexTest extends AbstractMessageSearchIndexTest @Override public void searchWithTextShouldReturnMailsWhenHtmlBodyMatchesWithStemming() throws Exception { } + + @Ignore("JAMES-2756 SimpleMessageSearchIndex doesn't decode header values before searching") + @Override + public void addressShouldReturnTheRightUidOfTheMessageContainingUTF8EncodingToHeaderName() { + } } diff --git a/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/AbstractMessageSearchIndexTest.java b/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/AbstractMessageSearchIndexTest.java index d7d6744..6df7e78 100644 --- a/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/AbstractMessageSearchIndexTest.java +++ b/mailbox/store/src/test/java/org/apache/james/mailbox/store/search/AbstractMessageSearchIndexTest.java @@ -820,6 +820,18 @@ public abstract class AbstractMessageSearchIndexTest { } @Test + public void addressShouldReturnTheRightUidOfTheMessageContainingUTF8EncodingToHeaderName() throws Exception { + Assume.assumeTrue(storeMailboxManager + .getSupportedSearchCapabilities() + .contains(MailboxManager.SearchCapabilities.PartialEmailMatch)); + + SearchQuery searchQuery = new SearchQuery(SearchQuery.address(AddressType.To, "Üsteliğhan")); + + assertThat(messageSearchIndex.search(session, mailbox, searchQuery)) + .containsOnly(m8.getUid()); + } + + @Test public void addressShouldReturnUidHavingRightRecipientWhenToIsSpecified() throws Exception { SearchQuery searchQuery = new SearchQuery(SearchQuery.address(AddressType.To, "[email protected]")); diff --git a/mailbox/store/src/test/resources/eml/mail.eml b/mailbox/store/src/test/resources/eml/mail.eml index 6a8d498..e5d5d8f 100644 --- a/mailbox/store/src/test/resources/eml/mail.eml +++ b/mailbox/store/src/test/resources/eml/mail.eml @@ -63,7 +63,7 @@ Received: by 10.27.96.135 with HTTP; Wed, 3 Jun 2015 21:08:41 -0700 (PDT) From: Murari <[email protected]> Date: Thu, 4 Jun 2015 06:08:41 +0200 Message-ID: <can1zdnw5pw7z5msm-tjupouygxwy6z-25a3wcb-c5bvqdup...@mail.gmail.com> -To: General Discussion about Arch Linux <[email protected]> +To: General Discussion about Arch Linux <[email protected]>, =?UTF-8?Q?=C3=9Csteli=C4=9Fhan_Ma=C5=9Frapa?= <[email protected]> Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [arch-general] Inkscape fails to open svg files diff --git a/mailbox/store/src/test/resources/eml/mail.json b/mailbox/store/src/test/resources/eml/mail.json index 2ad96b7..ab07ece 100644 --- a/mailbox/store/src/test/resources/eml/mail.json +++ b/mailbox/store/src/test/resources/eml/mail.json @@ -111,7 +111,7 @@ "2.1.20" ], "to": [ - "General Discussion about Arch Linux <[email protected]>" + "General Discussion about Arch Linux <[email protected]>, Üsteliğhan Maşrapa <[email protected]>" ], "x-content-filtered-by": [ "Mailman/MimeDel 2.1.20" @@ -130,6 +130,10 @@ { "name": "General Discussion about Arch Linux", "address": "[email protected]" + }, + { + "name": "Üsteliğhan Maşrapa", + "address": "[email protected]" } ], "cc": [], --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
