linagora / james-project

Mirror of Apache James Project
Apache License 2.0
70 stars 63 forks source link

[Postgres] Fix flaky tests in PostgresEmailQueryMethodTest #5092

Closed hungphan227 closed 5 months ago

hungphan227 commented 6 months ago

Fix the following:

hungphan227 commented 6 months ago

In SortConverter:

            case MailboxTo :
                return Stream.of(new FieldSort.Builder().field(TO + PATH_SEPARATOR + NAME + PATH_SEPARATOR + RAW),
                    new FieldSort.Builder().field(CC + PATH_SEPARATOR + ADDRESS + PATH_SEPARATOR + RAW));

When I change NAME to ADDRESS, test listMailsShouldBeSortedWhenUsingTo pass

vttranlina commented 5 months ago

I see it still not resolved https://github.com/apache/james-project/blob/postgresql/server/protocols/jmap-rfc-8621-integration-tests/postgres-jmap-rfc-8621-integration-tests/src/test/java/org/apache/james/jmap/rfc8621/postgres/PostgresEmailQueryMethodTest.java#L68 Do we miss something here? Reopen? @Arsnael @hungphan227

Arsnael commented 5 months ago

I must have made a mistake here sorry. Good catch @vttranlina

hungphan227 commented 5 months ago

pr https://github.com/apache/james-project/pull/2183