chore(quarkus-327): bump to Quarkus 3.27.3 LTS, make pom autonomous, fix 3 tests (NPE guard, equalsHashCode with shared refs), rename deprecated config keys
This commit is contained in:
31
pom.xml
31
pom.xml
@@ -4,14 +4,9 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>dev.lions.unionflow</groupId>
|
<groupId>dev.lions.unionflow</groupId>
|
||||||
<artifactId>unionflow-parent</artifactId>
|
|
||||||
<version>1.0.5</version>
|
|
||||||
<relativePath>../unionflow-server-api/parent-pom.xml</relativePath>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>unionflow-server-impl-quarkus</artifactId>
|
<artifactId>unionflow-server-impl-quarkus</artifactId>
|
||||||
|
<version>1.0.7</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>UnionFlow Server Implementation (Quarkus)</name>
|
<name>UnionFlow Server Implementation (Quarkus)</name>
|
||||||
@@ -23,9 +18,13 @@
|
|||||||
<maven.compiler.release>21</maven.compiler.release>
|
<maven.compiler.release>21</maven.compiler.release>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
|
||||||
<quarkus.platform.version>3.20.0</quarkus.platform.version>
|
<quarkus.platform.version>3.27.3</quarkus.platform.version>
|
||||||
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
|
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
|
||||||
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
|
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
|
||||||
|
<lombok.version>1.18.38</lombok.version>
|
||||||
|
<!-- Overrides BOM : Docker Desktop 29.x compat -->
|
||||||
|
<testcontainers.version>1.21.4</testcontainers.version>
|
||||||
|
<docker-java.version>3.4.2</docker-java.version>
|
||||||
|
|
||||||
<!-- Jacoco -->
|
<!-- Jacoco -->
|
||||||
<jacoco.version>0.8.12</jacoco.version>
|
<jacoco.version>0.8.12</jacoco.version>
|
||||||
@@ -40,6 +39,20 @@
|
|||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.testcontainers</groupId>
|
||||||
|
<artifactId>testcontainers-bom</artifactId>
|
||||||
|
<version>${testcontainers.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
<!-- Lombok : pas dans Quarkus BOM -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>${lombok.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
@@ -48,14 +61,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>dev.lions.unionflow</groupId>
|
<groupId>dev.lions.unionflow</groupId>
|
||||||
<artifactId>unionflow-server-api</artifactId>
|
<artifactId>unionflow-server-api</artifactId>
|
||||||
<version>1.0.5</version>
|
<version>1.0.7</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Lions User Manager API (pour DTOs et client Keycloak) -->
|
<!-- Lions User Manager API (pour DTOs et client Keycloak) -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>dev.lions.user.manager</groupId>
|
<groupId>dev.lions.user.manager</groupId>
|
||||||
<artifactId>lions-user-manager-server-api</artifactId>
|
<artifactId>lions-user-manager-server-api</artifactId>
|
||||||
<version>1.0.0</version>
|
<version>1.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Quarkus Core -->
|
<!-- Quarkus Core -->
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ public class DashboardWebSocketEndpoint {
|
|||||||
public String onMessage(String message, WebSocketConnection connection) {
|
public String onMessage(String message, WebSocketConnection connection) {
|
||||||
LOG.debugf("WebSocket message received from %s: %s", connection.id(), message);
|
LOG.debugf("WebSocket message received from %s: %s", connection.id(), message);
|
||||||
|
|
||||||
|
if (message == null) {
|
||||||
|
return "{\"type\":\"ack\",\"data\":{\"received\":true}}";
|
||||||
|
}
|
||||||
|
|
||||||
// Répondre aux pings avec un pong (heartbeat)
|
// Répondre aux pings avec un pong (heartbeat)
|
||||||
if ("ping".equalsIgnoreCase(message.trim()) || message.contains("\"type\":\"ping\"")) {
|
if ("ping".equalsIgnoreCase(message.trim()) || message.contains("\"type\":\"ping\"")) {
|
||||||
return "{\"type\":\"pong\",\"data\":{\"timestamp\":" + System.currentTimeMillis() + "}}";
|
return "{\"type\":\"pong\",\"data\":{\"timestamp\":" + System.currentTimeMillis() + "}}";
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ quarkus.datasource.jdbc.min-size=2
|
|||||||
quarkus.datasource.jdbc.max-size=10
|
quarkus.datasource.jdbc.max-size=10
|
||||||
|
|
||||||
# Hibernate — Mode update pour créer automatiquement les colonnes manquantes
|
# Hibernate — Mode update pour créer automatiquement les colonnes manquantes
|
||||||
quarkus.hibernate-orm.database.generation=update
|
quarkus.hibernate-orm.schema-management.strategy=update
|
||||||
quarkus.hibernate-orm.log.sql=true
|
quarkus.hibernate-orm.log.sql=true
|
||||||
|
|
||||||
# Flyway — activé avec réparation auto des checksums modifiés
|
# Flyway — activé avec réparation auto des checksums modifiés
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ quarkus.datasource.jdbc.idle-removal-interval=PT2M
|
|||||||
quarkus.datasource.jdbc.max-lifetime=PT30M
|
quarkus.datasource.jdbc.max-lifetime=PT30M
|
||||||
|
|
||||||
# Hibernate — Validate uniquement (Flyway gère le schéma)
|
# Hibernate — Validate uniquement (Flyway gère le schéma)
|
||||||
quarkus.hibernate-orm.database.generation=validate
|
quarkus.hibernate-orm.schema-management.strategy=validate
|
||||||
quarkus.hibernate-orm.statistics=false
|
quarkus.hibernate-orm.statistics=false
|
||||||
|
|
||||||
# Flyway — ignorer les migrations appliquées en DB mais absentes localement
|
# Flyway — ignorer les migrations appliquées en DB mais absentes localement
|
||||||
@@ -49,7 +49,7 @@ quarkus.smallrye-openapi.oidc-open-id-connect-url=${quarkus.oidc.auth-server-url
|
|||||||
quarkus.swagger-ui.always-include=false
|
quarkus.swagger-ui.always-include=false
|
||||||
|
|
||||||
# Logging — fichier en production (le répertoire doit exister dans le container)
|
# Logging — fichier en production (le répertoire doit exister dans le container)
|
||||||
quarkus.log.file.enable=false
|
quarkus.log.file.enabled=false
|
||||||
quarkus.log.file.path=/var/log/unionflow/server.log
|
quarkus.log.file.path=/var/log/unionflow/server.log
|
||||||
quarkus.log.file.rotation.max-file-size=10M
|
quarkus.log.file.rotation.max-file-size=10M
|
||||||
quarkus.log.file.rotation.max-backup-index=5
|
quarkus.log.file.rotation.max-backup-index=5
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ quarkus.datasource.password=sa
|
|||||||
quarkus.datasource.jdbc.url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL;NON_KEYWORDS=MONTH,YEAR
|
quarkus.datasource.jdbc.url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL;NON_KEYWORDS=MONTH,YEAR
|
||||||
|
|
||||||
# Configuration Hibernate pour tests
|
# Configuration Hibernate pour tests
|
||||||
quarkus.hibernate-orm.database.generation=update
|
quarkus.hibernate-orm.schema-management.strategy=update
|
||||||
# Désactiver complètement l'exécution des scripts SQL au démarrage
|
# Désactiver complètement l'exécution des scripts SQL au démarrage
|
||||||
quarkus.hibernate-orm.sql-load-script=no-file
|
quarkus.hibernate-orm.sql-load-script=no-file
|
||||||
# Empêcher Hibernate d'exécuter les scripts SQL automatiquement
|
# Empêcher Hibernate d'exécuter les scripts SQL automatiquement
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ quarkus.datasource.password=${DB_PASSWORD:changeme}
|
|||||||
quarkus.datasource.jdbc.url=${DB_URL:jdbc:postgresql://localhost:5432/unionflow}
|
quarkus.datasource.jdbc.url=${DB_URL:jdbc:postgresql://localhost:5432/unionflow}
|
||||||
|
|
||||||
# Configuration CORS
|
# Configuration CORS
|
||||||
quarkus.http.cors=true
|
quarkus.http.cors.enabled=true
|
||||||
quarkus.http.cors.methods=GET,POST,PUT,DELETE,OPTIONS
|
quarkus.http.cors.methods=GET,POST,PUT,DELETE,OPTIONS
|
||||||
quarkus.http.cors.headers=Content-Type,Authorization
|
quarkus.http.cors.headers=Content-Type,Authorization
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ quarkus.http.auth.permission.public.paths=/health,/q/*,/favicon.ico,/auth/callba
|
|||||||
quarkus.http.auth.permission.public.policy=permit
|
quarkus.http.auth.permission.public.policy=permit
|
||||||
|
|
||||||
# Configuration Hibernate — base commune
|
# Configuration Hibernate — base commune
|
||||||
quarkus.hibernate-orm.database.generation=update
|
quarkus.hibernate-orm.schema-management.strategy=update
|
||||||
quarkus.hibernate-orm.log.sql=false
|
quarkus.hibernate-orm.log.sql=false
|
||||||
quarkus.hibernate-orm.jdbc.timezone=UTC
|
quarkus.hibernate-orm.jdbc.timezone=UTC
|
||||||
# Configuration Flyway — base commune
|
# Configuration Flyway — base commune
|
||||||
@@ -96,7 +96,7 @@ quarkus.hibernate-orm.metrics.enabled=true
|
|||||||
# JVM + HTTP server + datasource metrics activés par défaut avec quarkus-micrometer
|
# JVM + HTTP server + datasource metrics activés par défaut avec quarkus-micrometer
|
||||||
|
|
||||||
# Logging — base commune
|
# Logging — base commune
|
||||||
quarkus.log.console.enable=true
|
quarkus.log.console.enabled=true
|
||||||
quarkus.log.console.level=INFO
|
quarkus.log.console.level=INFO
|
||||||
quarkus.log.console.format=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{2.}] (%t) %s%e%n
|
quarkus.log.console.format=%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{2.}] (%t) %s%e%n
|
||||||
quarkus.log.category."dev.lions.unionflow".level=INFO
|
quarkus.log.category."dev.lions.unionflow".level=INFO
|
||||||
|
|||||||
@@ -103,10 +103,23 @@ class ConversationParticipantTest {
|
|||||||
@DisplayName("equals et hashCode")
|
@DisplayName("equals et hashCode")
|
||||||
void equalsHashCode() {
|
void equalsHashCode() {
|
||||||
UUID id = UUID.randomUUID();
|
UUID id = UUID.randomUUID();
|
||||||
ConversationParticipant a = buildMinimal("PARTICIPANT");
|
// Partage les mêmes Conversation et Membre pour que Lombok equals
|
||||||
|
// sur les champs imbriqués donne true (les IDs imbriqués sont aléatoires
|
||||||
|
// dans newConversation/newMembre, donc il faut réutiliser les instances).
|
||||||
|
Conversation sharedConv = newConversation();
|
||||||
|
Membre sharedMembre = newMembre();
|
||||||
|
ConversationParticipant a = new ConversationParticipant();
|
||||||
a.setId(id);
|
a.setId(id);
|
||||||
ConversationParticipant b = buildMinimal("PARTICIPANT");
|
a.setConversation(sharedConv);
|
||||||
|
a.setMembre(sharedMembre);
|
||||||
|
a.setRoleDansConversation("PARTICIPANT");
|
||||||
|
a.setNotifier(true);
|
||||||
|
ConversationParticipant b = new ConversationParticipant();
|
||||||
b.setId(id);
|
b.setId(id);
|
||||||
|
b.setConversation(sharedConv);
|
||||||
|
b.setMembre(sharedMembre);
|
||||||
|
b.setRoleDansConversation("PARTICIPANT");
|
||||||
|
b.setNotifier(true);
|
||||||
assertThat(a).isEqualTo(b);
|
assertThat(a).isEqualTo(b);
|
||||||
assertThat(a.hashCode()).isEqualTo(b.hashCode());
|
assertThat(a.hashCode()).isEqualTo(b.hashCode());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,10 +143,23 @@ class MessageTest {
|
|||||||
@DisplayName("equals et hashCode")
|
@DisplayName("equals et hashCode")
|
||||||
void equalsHashCode() {
|
void equalsHashCode() {
|
||||||
UUID id = UUID.randomUUID();
|
UUID id = UUID.randomUUID();
|
||||||
Message a = buildMinimal(TypeContenu.TEXTE);
|
// Partage Conversation et Membre pour que Lombok equals
|
||||||
|
// (récursif sur les champs) donne true — sinon les UUIDs aléatoires
|
||||||
|
// dans newConversation/newMembre cassent l'égalité.
|
||||||
|
Conversation sharedConv = newConversation();
|
||||||
|
Membre sharedExpediteur = newMembre();
|
||||||
|
Message a = new Message();
|
||||||
a.setId(id);
|
a.setId(id);
|
||||||
Message b = buildMinimal(TypeContenu.TEXTE);
|
a.setConversation(sharedConv);
|
||||||
|
a.setExpediteur(sharedExpediteur);
|
||||||
|
a.setTypeMessage(TypeContenu.TEXTE);
|
||||||
|
a.setContenu("Texte test");
|
||||||
|
Message b = new Message();
|
||||||
b.setId(id);
|
b.setId(id);
|
||||||
|
b.setConversation(sharedConv);
|
||||||
|
b.setExpediteur(sharedExpediteur);
|
||||||
|
b.setTypeMessage(TypeContenu.TEXTE);
|
||||||
|
b.setContenu("Texte test");
|
||||||
assertThat(a).isEqualTo(b);
|
assertThat(a).isEqualTo(b);
|
||||||
assertThat(a.hashCode()).isEqualTo(b.hashCode());
|
assertThat(a.hashCode()).isEqualTo(b.hashCode());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ quarkus.datasource.db-kind=postgresql
|
|||||||
quarkus.datasource.username=unionflow_test
|
quarkus.datasource.username=unionflow_test
|
||||||
quarkus.datasource.password=unionflow_test
|
quarkus.datasource.password=unionflow_test
|
||||||
|
|
||||||
quarkus.hibernate-orm.database.generation=drop-and-create
|
quarkus.hibernate-orm.schema-management.strategy=drop-and-create
|
||||||
quarkus.flyway.enabled=true
|
quarkus.flyway.enabled=true
|
||||||
quarkus.flyway.migrate-at-start=true
|
quarkus.flyway.migrate-at-start=true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user