You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2023/12/26 07:27:17 UTC
(james-project) branch postgresql updated (23be5d2b63 -> 42cb00e2b3)
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a change to branch postgresql
in repository https://gitbox.apache.org/repos/asf/james-project.git
from 23be5d2b63 JAMES-2586 Fixup search overrides - Using Postgres Factory Executor replace to invoke DAO directly (#1880)
new 3e86c78b58 JAMES-2586 Implement PostgresEventDeadLetters
new 72861a5b4f JAMES-2586 Fix flaky test DistributedPostgresJamesServerTest.guiceServerShouldUpdateQuota
new 42cb00e2b3 JAMES-2586 Add missing license
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
Jenkinsfile | 3 +-
event-bus/pom.xml | 1 +
event-bus/{cassandra => postgres}/pom.xml | 30 ++++++-----
.../james/events/PostgresEventDeadLetters.java} | 62 ++++++++++++++++------
.../events/PostgresEventDeadLettersModule.java | 28 +++++++---
.../james/events/PostgresEventDeadLettersTest.java | 16 +++---
pom.xml | 5 ++
.../org/apache/james/PostgresJamesServerMain.java | 4 +-
.../james/DistributedPostgresJamesServerTest.java | 9 ++--
server/container/guice/postgres-common/pom.xml | 4 ++
.../modules/events/PostgresDeadLetterModule.java} | 16 ++++--
11 files changed, 119 insertions(+), 59 deletions(-)
copy event-bus/{cassandra => postgres}/pom.xml (74%)
copy event-bus/{cassandra/src/main/java/org/apache/james/events/CassandraEventDeadLetters.java => postgres/src/main/java/org/apache/james/events/PostgresEventDeadLetters.java} (52%)
copy server/data/data-postgres/src/main/java/org/apache/james/domainlist/postgres/PostgresDomainModule.java => event-bus/postgres/src/main/java/org/apache/james/events/PostgresEventDeadLettersModule.java (63%)
copy mailbox/postgres/src/test/java/org/apache/james/mailbox/postgres/mail/PostgresMessageMoveTest.java => event-bus/postgres/src/test/java/org/apache/james/events/PostgresEventDeadLettersTest.java (74%)
copy server/container/guice/{mailbox/src/main/java/org/apache/james/modules/mailbox/MemoryDeadLetterModule.java => postgres-common/src/main/java/org/apache/james/modules/events/PostgresDeadLetterModule.java} (72%)
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
(james-project) 01/03: JAMES-2586 Implement PostgresEventDeadLetters
Posted by rc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch postgresql
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 3e86c78b58f53e50606aea06adeb17ab2a778861
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Mon Dec 25 16:41:49 2023 +0700
JAMES-2586 Implement PostgresEventDeadLetters
---
Jenkinsfile | 3 +-
event-bus/pom.xml | 1 +
event-bus/postgres/pom.xml | 52 +++++++++
.../james/events/PostgresEventDeadLetters.java | 120 +++++++++++++++++++++
.../events/PostgresEventDeadLettersModule.java | 59 ++++++++++
.../james/events/PostgresEventDeadLettersTest.java | 35 ++++++
pom.xml | 5 +
.../org/apache/james/PostgresJamesServerMain.java | 4 +-
server/container/guice/postgres-common/pom.xml | 4 +
.../modules/events/PostgresDeadLetterModule.java | 47 ++++++++
10 files changed, 327 insertions(+), 3 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 2c8e67c965..e27ed683f4 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -45,7 +45,8 @@ pipeline {
'server/container/guice/postgres-common,' +
'server/container/guice/mailbox-postgres,' +
'server/apps/postgres-app,' +
- 'mpt/impl/imap-mailbox/postgres'
+ 'mpt/impl/imap-mailbox/postgres,' +
+ 'event-bus/postgres'
}
tools {
diff --git a/event-bus/pom.xml b/event-bus/pom.xml
index 64b10dcded..16a649f432 100644
--- a/event-bus/pom.xml
+++ b/event-bus/pom.xml
@@ -34,5 +34,6 @@
<module>cassandra</module>
<module>distributed</module>
<module>in-vm</module>
+ <module>postgres</module>
</modules>
</project>
diff --git a/event-bus/postgres/pom.xml b/event-bus/postgres/pom.xml
new file mode 100644
index 0000000000..df8f19be2c
--- /dev/null
+++ b/event-bus/postgres/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.james</groupId>
+ <artifactId>event-bus</artifactId>
+ <version>3.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>dead-letter-postgres</artifactId>
+ <name>Apache James :: Event Bus :: Dead Letter :: Postgres</name>
+ <description>In Postgres implementation for the eventDeadLetter API</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>${james.groupId}</groupId>
+ <artifactId>apache-james-backends-postgres</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${james.groupId}</groupId>
+ <artifactId>apache-james-backends-postgres</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${james.groupId}</groupId>
+ <artifactId>event-bus-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${james.groupId}</groupId>
+ <artifactId>event-bus-api</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${james.groupId}</groupId>
+ <artifactId>james-server-guice-common</artifactId>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${james.groupId}</groupId>
+ <artifactId>testing-base</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testcontainers</groupId>
+ <artifactId>postgresql</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/event-bus/postgres/src/main/java/org/apache/james/events/PostgresEventDeadLetters.java b/event-bus/postgres/src/main/java/org/apache/james/events/PostgresEventDeadLetters.java
new file mode 100644
index 0000000000..be6db0c7be
--- /dev/null
+++ b/event-bus/postgres/src/main/java/org/apache/james/events/PostgresEventDeadLetters.java
@@ -0,0 +1,120 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.james.events;
+
+import static org.apache.james.events.PostgresEventDeadLettersModule.PostgresEventDeadLettersTable.EVENT;
+import static org.apache.james.events.PostgresEventDeadLettersModule.PostgresEventDeadLettersTable.GROUP;
+import static org.apache.james.events.PostgresEventDeadLettersModule.PostgresEventDeadLettersTable.INSERTION_ID;
+import static org.apache.james.events.PostgresEventDeadLettersModule.PostgresEventDeadLettersTable.TABLE_NAME;
+
+import javax.inject.Inject;
+
+import org.apache.james.backends.postgres.utils.PostgresExecutor;
+import org.jooq.Record;
+
+import com.github.fge.lambdas.Throwing;
+import com.google.common.base.Preconditions;
+
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+public class PostgresEventDeadLetters implements EventDeadLetters {
+ private final PostgresExecutor postgresExecutor;
+ private final EventSerializer eventSerializer;
+
+ @Inject
+ public PostgresEventDeadLetters(PostgresExecutor postgresExecutor, EventSerializer eventSerializer) {
+ this.postgresExecutor = postgresExecutor;
+ this.eventSerializer = eventSerializer;
+ }
+
+ @Override
+ public Mono<InsertionId> store(Group registeredGroup, Event failDeliveredEvent) {
+ Preconditions.checkArgument(registeredGroup != null, REGISTERED_GROUP_CANNOT_BE_NULL);
+ Preconditions.checkArgument(failDeliveredEvent != null, FAIL_DELIVERED_EVENT_CANNOT_BE_NULL);
+
+ InsertionId insertionId = InsertionId.random();
+ return postgresExecutor.executeVoid(dslContext -> Mono.from(dslContext.insertInto(TABLE_NAME)
+ .set(INSERTION_ID, insertionId.getId())
+ .set(GROUP, registeredGroup.asString())
+ .set(EVENT, eventSerializer.toJson(failDeliveredEvent))))
+ .thenReturn(insertionId);
+ }
+
+ @Override
+ public Mono<Void> remove(Group registeredGroup, InsertionId failDeliveredInsertionId) {
+ Preconditions.checkArgument(registeredGroup != null, REGISTERED_GROUP_CANNOT_BE_NULL);
+ Preconditions.checkArgument(failDeliveredInsertionId != null, FAIL_DELIVERED_ID_INSERTION_CANNOT_BE_NULL);
+
+ return postgresExecutor.executeVoid(dslContext -> Mono.from(dslContext.deleteFrom(TABLE_NAME)
+ .where(INSERTION_ID.eq(failDeliveredInsertionId.getId()))));
+ }
+
+ @Override
+ public Mono<Void> remove(Group registeredGroup) {
+ Preconditions.checkArgument(registeredGroup != null, REGISTERED_GROUP_CANNOT_BE_NULL);
+
+ return postgresExecutor.executeVoid(dslContext -> Mono.from(dslContext.deleteFrom(TABLE_NAME)
+ .where(GROUP.eq(registeredGroup.asString()))));
+ }
+
+ @Override
+ public Mono<Event> failedEvent(Group registeredGroup, InsertionId failDeliveredInsertionId) {
+ Preconditions.checkArgument(registeredGroup != null, REGISTERED_GROUP_CANNOT_BE_NULL);
+ Preconditions.checkArgument(failDeliveredInsertionId != null, FAIL_DELIVERED_ID_INSERTION_CANNOT_BE_NULL);
+
+ return postgresExecutor.executeRow(dslContext -> Mono.from(dslContext.select(EVENT)
+ .from(TABLE_NAME)
+ .where(INSERTION_ID.eq(failDeliveredInsertionId.getId()))))
+ .map(this::deserializeEvent);
+ }
+
+ private Event deserializeEvent(Record record) {
+ return eventSerializer.asEvent(record.get(EVENT));
+ }
+
+ @Override
+ public Flux<InsertionId> failedIds(Group registeredGroup) {
+ Preconditions.checkArgument(registeredGroup != null, REGISTERED_GROUP_CANNOT_BE_NULL);
+
+ return postgresExecutor.executeRows(dslContext -> Flux.from(dslContext
+ .select(INSERTION_ID)
+ .from(TABLE_NAME)
+ .where(GROUP.eq(registeredGroup.asString()))))
+ .map(record -> InsertionId.of(record.get(INSERTION_ID)));
+ }
+
+ @Override
+ public Flux<Group> groupsWithFailedEvents() {
+ return postgresExecutor.executeRows(dslContext -> Flux.from(dslContext
+ .selectDistinct(GROUP)
+ .from(TABLE_NAME)))
+ .map(Throwing.function(record -> Group.deserialize(record.get(GROUP))));
+ }
+
+ @Override
+ public Mono<Boolean> containEvents() {
+ return postgresExecutor.executeRow(dslContext -> Mono.from(dslContext
+ .select(INSERTION_ID)
+ .from(TABLE_NAME)
+ .limit(1)))
+ .hasElement();
+ }
+}
diff --git a/event-bus/postgres/src/main/java/org/apache/james/events/PostgresEventDeadLettersModule.java b/event-bus/postgres/src/main/java/org/apache/james/events/PostgresEventDeadLettersModule.java
new file mode 100644
index 0000000000..28d5809c26
--- /dev/null
+++ b/event-bus/postgres/src/main/java/org/apache/james/events/PostgresEventDeadLettersModule.java
@@ -0,0 +1,59 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.james.events;
+
+import java.util.UUID;
+
+import org.apache.james.backends.postgres.PostgresIndex;
+import org.apache.james.backends.postgres.PostgresModule;
+import org.apache.james.backends.postgres.PostgresTable;
+import org.jooq.Field;
+import org.jooq.Record;
+import org.jooq.Table;
+import org.jooq.impl.DSL;
+import org.jooq.impl.SQLDataType;
+
+public interface PostgresEventDeadLettersModule {
+ interface PostgresEventDeadLettersTable {
+ Table<Record> TABLE_NAME = DSL.table("event_dead_letters");
+
+ Field<UUID> INSERTION_ID = DSL.field("insertion_id", SQLDataType.UUID.notNull());
+ Field<String> GROUP = DSL.field("\"group\"", SQLDataType.VARCHAR.notNull());
+ Field<String> EVENT = DSL.field("event", SQLDataType.VARCHAR.notNull());
+
+ PostgresTable TABLE = PostgresTable.name(TABLE_NAME.getName())
+ .createTableStep(((dsl, tableName) -> dsl.createTableIfNotExists(tableName)
+ .column(INSERTION_ID)
+ .column(GROUP)
+ .column(EVENT)
+ .primaryKey(INSERTION_ID)))
+ .disableRowLevelSecurity()
+ .build();
+
+ PostgresIndex GROUP_INDEX = PostgresIndex.name("event_dead_letters_group_index")
+ .createIndexStep((dsl, indexName) -> dsl.createIndexIfNotExists(indexName)
+ .on(TABLE_NAME, GROUP));
+ }
+
+ PostgresModule MODULE = PostgresModule.builder()
+ .addTable(PostgresEventDeadLettersTable.TABLE)
+ .addIndex(PostgresEventDeadLettersTable.GROUP_INDEX)
+ .build();
+}
diff --git a/event-bus/postgres/src/test/java/org/apache/james/events/PostgresEventDeadLettersTest.java b/event-bus/postgres/src/test/java/org/apache/james/events/PostgresEventDeadLettersTest.java
new file mode 100644
index 0000000000..7677f4e3cd
--- /dev/null
+++ b/event-bus/postgres/src/test/java/org/apache/james/events/PostgresEventDeadLettersTest.java
@@ -0,0 +1,35 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.james.events;
+
+import org.apache.james.backends.postgres.PostgresExtension;
+import org.apache.james.backends.postgres.PostgresModule;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+public class PostgresEventDeadLettersTest implements EventDeadLettersContract.AllContracts {
+ @RegisterExtension
+ static PostgresExtension postgresExtension = PostgresExtension.withoutRowLevelSecurity(
+ PostgresModule.aggregateModules(PostgresEventDeadLettersModule.MODULE));
+
+ @Override
+ public EventDeadLetters eventDeadLetters() {
+ return new PostgresEventDeadLetters(postgresExtension.getPostgresExecutor(), new EventBusTestFixture.TestEventSerializer());
+ }
+}
diff --git a/pom.xml b/pom.xml
index 237bfa9715..03e3a1a41e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1207,6 +1207,11 @@
<artifactId>dead-letter-cassandra</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>${james.groupId}</groupId>
+ <artifactId>dead-letter-postgres</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>${james.groupId}</groupId>
<artifactId>event-bus-api</artifactId>
diff --git a/server/apps/postgres-app/src/main/java/org/apache/james/PostgresJamesServerMain.java b/server/apps/postgres-app/src/main/java/org/apache/james/PostgresJamesServerMain.java
index 28434ebe96..a106e0da41 100644
--- a/server/apps/postgres-app/src/main/java/org/apache/james/PostgresJamesServerMain.java
+++ b/server/apps/postgres-app/src/main/java/org/apache/james/PostgresJamesServerMain.java
@@ -33,9 +33,9 @@ import org.apache.james.modules.data.PostgresDelegationStoreModule;
import org.apache.james.modules.data.PostgresUsersRepositoryModule;
import org.apache.james.modules.data.SievePostgresRepositoryModules;
import org.apache.james.modules.event.RabbitMQEventBusModule;
+import org.apache.james.modules.events.PostgresDeadLetterModule;
import org.apache.james.modules.eventstore.MemoryEventStoreModule;
import org.apache.james.modules.mailbox.DefaultEventModule;
-import org.apache.james.modules.mailbox.MemoryDeadLetterModule;
import org.apache.james.modules.mailbox.PostgresMailboxModule;
import org.apache.james.modules.mailbox.TikaMailboxModule;
import org.apache.james.modules.protocols.IMAPServerModule;
@@ -94,13 +94,13 @@ public class PostgresJamesServerMain implements JamesServerMain {
new PostgresDelegationStoreModule(),
new DefaultProcessorsConfigurationProviderModule(),
new PostgresMailboxModule(),
+ new PostgresDeadLetterModule(),
new PostgresDataModule(),
new MailboxModule(),
new NoJwtModule(),
new RawPostDequeueDecoratorModule(),
new SievePostgresRepositoryModules(),
new TaskManagerModule(),
- new MemoryDeadLetterModule(),
new MemoryEventStoreModule(),
new TikaMailboxModule());
diff --git a/server/container/guice/postgres-common/pom.xml b/server/container/guice/postgres-common/pom.xml
index 3ccde23bd9..f6d77993a5 100644
--- a/server/container/guice/postgres-common/pom.xml
+++ b/server/container/guice/postgres-common/pom.xml
@@ -44,6 +44,10 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>${james.groupId}</groupId>
+ <artifactId>dead-letter-postgres</artifactId>
+ </dependency>
<dependency>
<groupId>${james.groupId}</groupId>
<artifactId>james-server-data-file</artifactId>
diff --git a/server/container/guice/postgres-common/src/main/java/org/apache/james/modules/events/PostgresDeadLetterModule.java b/server/container/guice/postgres-common/src/main/java/org/apache/james/modules/events/PostgresDeadLetterModule.java
new file mode 100644
index 0000000000..9745ea79c1
--- /dev/null
+++ b/server/container/guice/postgres-common/src/main/java/org/apache/james/modules/events/PostgresDeadLetterModule.java
@@ -0,0 +1,47 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one *
+ * or more contributor license agreements. See the NOTICE file *
+ * distributed with this work for additional information *
+ * regarding copyright ownership. The ASF licenses this file *
+ * to you under the Apache License, Version 2.0 (the *
+ * "License"); you may not use this file except in compliance *
+ * with the License. You may obtain a copy of the License at *
+ * *
+ * http://www.apache.org/licenses/LICENSE-2.0 *
+ * *
+ * Unless required by applicable law or agreed to in writing, *
+ * software distributed under the License is distributed on an *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
+ * KIND, either express or implied. See the License for the *
+ * specific language governing permissions and limitations *
+ * under the License. *
+ ****************************************************************/
+
+package org.apache.james.modules.events;
+
+import org.apache.james.backends.postgres.PostgresModule;
+import org.apache.james.core.healthcheck.HealthCheck;
+import org.apache.james.events.EventDeadLetters;
+import org.apache.james.events.EventDeadLettersHealthCheck;
+import org.apache.james.events.PostgresEventDeadLetters;
+import org.apache.james.events.PostgresEventDeadLettersModule;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Scopes;
+import com.google.inject.multibindings.Multibinder;
+
+public class PostgresDeadLetterModule extends AbstractModule {
+ @Override
+ protected void configure() {
+ Multibinder.newSetBinder(binder(), PostgresModule.class)
+ .addBinding().toInstance(PostgresEventDeadLettersModule.MODULE);
+
+ bind(PostgresEventDeadLetters.class).in(Scopes.SINGLETON);
+ bind(EventDeadLetters.class).to(PostgresEventDeadLetters.class);
+
+ bind(EventDeadLettersHealthCheck.class).in(Scopes.SINGLETON);
+ Multibinder.newSetBinder(binder(), HealthCheck.class)
+ .addBinding()
+ .to(EventDeadLettersHealthCheck.class);
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
(james-project) 02/03: JAMES-2586 Fix flaky test DistributedPostgresJamesServerTest.guiceServerShouldUpdateQuota
Posted by rc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch postgresql
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 72861a5b4f79fa2c01c5bb05bbee334cf4ea944b
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Mon Dec 25 21:13:58 2023 +0700
JAMES-2586 Fix flaky test DistributedPostgresJamesServerTest.guiceServerShouldUpdateQuota
Co-authored-by: Tung Van TRAN <vt...@linagora.com>
---
.../org/apache/james/DistributedPostgresJamesServerTest.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/server/apps/postgres-app/src/test/java/org/apache/james/DistributedPostgresJamesServerTest.java b/server/apps/postgres-app/src/test/java/org/apache/james/DistributedPostgresJamesServerTest.java
index 9856247b1e..76635c69c7 100644
--- a/server/apps/postgres-app/src/test/java/org/apache/james/DistributedPostgresJamesServerTest.java
+++ b/server/apps/postgres-app/src/test/java/org/apache/james/DistributedPostgresJamesServerTest.java
@@ -107,12 +107,11 @@ class DistributedPostgresJamesServerTest implements JamesServerConcreteContract
.select(TestIMAPClient.INBOX)
.hasAMessage());
- assertThat(
- testIMAPClient.connect(JAMES_SERVER_HOST, imapPort)
- .login(USER, PASSWORD)
- .getQuotaRoot(TestIMAPClient.INBOX))
+ AWAIT.untilAsserted(() -> assertThat(testIMAPClient.connect(JAMES_SERVER_HOST, imapPort)
+ .login(USER, PASSWORD)
+ .getQuotaRoot(TestIMAPClient.INBOX))
.startsWith("* QUOTAROOT \"INBOX\" #private&toto@james.local\r\n" +
"* QUOTA #private&toto@james.local (STORAGE 12 50)\r\n")
- .endsWith("OK GETQUOTAROOT completed.\r\n");
+ .endsWith("OK GETQUOTAROOT completed.\r\n"));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org
(james-project) 03/03: JAMES-2586 Add missing license
Posted by rc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch postgresql
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 42cb00e2b3cd4a9d87999984f426bdc302c525d9
Author: Quan Tran <hq...@linagora.com>
AuthorDate: Tue Dec 26 09:49:38 2023 +0700
JAMES-2586 Add missing license
---
event-bus/postgres/pom.xml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/event-bus/postgres/pom.xml b/event-bus/postgres/pom.xml
index df8f19be2c..033ab6dafc 100644
--- a/event-bus/postgres/pom.xml
+++ b/event-bus/postgres/pom.xml
@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org