-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dev services: MSSQL reactive client does not support JDBC url format
Fixes #25233 The "encrypt" property is not needed anyway, it is the default of both the JDBC and reactive clients. https://docs.microsoft.com/en-us/sql/connect/jdbc/understanding-ssl-support?view=sql-server-ver15#remarks (cherry picked from commit c4a4640)
- Loading branch information
1 parent
0657f6c
commit a57562b
Showing
4 changed files
with
91 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...nt/src/test/java/io/quarkus/reactive/mssql/client/DevServicesMsSQLDatasourceTestCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package io.quarkus.reactive.mssql.client; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import java.time.Duration; | ||
import java.util.Locale; | ||
import java.util.logging.Level; | ||
import java.util.logging.LogRecord; | ||
|
||
import javax.inject.Inject; | ||
|
||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.RegisterExtension; | ||
|
||
import io.quarkus.test.QuarkusUnitTest; | ||
import io.vertx.mutiny.mssqlclient.MSSQLPool; | ||
|
||
public class DevServicesMsSQLDatasourceTestCase { | ||
|
||
@RegisterExtension | ||
static QuarkusUnitTest test = new QuarkusUnitTest() | ||
.withApplicationRoot((jar) -> jar | ||
.addAsResource("container-license-acceptance.txt")) | ||
// Expect no warnings from reactive | ||
.setLogRecordPredicate(record -> record.getLevel().intValue() >= Level.WARNING.intValue() | ||
&& record.getMessage().toLowerCase(Locale.ENGLISH).contains("reactive")) | ||
.assertLogRecords(records -> assertThat(records) | ||
// This is just to get meaningful error messages, as LogRecord doesn't have a toString() | ||
.extracting(LogRecord::getMessage) | ||
.isEmpty()); | ||
|
||
@Inject | ||
MSSQLPool pool; | ||
|
||
@Test | ||
public void testDatasource() throws Exception { | ||
pool.withConnection(conn -> conn.query("SELECT 1").execute().replaceWithVoid()) | ||
.await().atMost(Duration.ofMinutes(2)); | ||
} | ||
} |