forked from quarkus-qe/quarkus-test-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix OpenShiftPostgresqlTransactionGeneralUsageIT when run with img fr…
…om RH registry
- Loading branch information
1 parent
f2cad72
commit 6c00f4d
Showing
4 changed files
with
47 additions
and
14 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
24 changes: 24 additions & 0 deletions
24
...src/test/java/io/quarkus/ts/transactions/AbstractPostgresqlTransactionGeneralUsageIT.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,24 @@ | ||
package io.quarkus.ts.transactions; | ||
|
||
import io.quarkus.test.bootstrap.PostgresqlService; | ||
import io.quarkus.test.bootstrap.RestService; | ||
import io.quarkus.ts.transactions.recovery.TransactionExecutor; | ||
|
||
public abstract class AbstractPostgresqlTransactionGeneralUsageIT extends TransactionCommons { | ||
|
||
static final int POSTGRESQL_PORT = 5432; | ||
|
||
@Override | ||
protected TransactionExecutor getTransactionExecutorUsedForRecovery() { | ||
return TransactionExecutor.TRANSACTIONAL_ANNOTATION; | ||
} | ||
|
||
protected static RestService createQuarkusApp(PostgresqlService database) { | ||
return new RestService().withProperties("postgresql.properties") | ||
.withProperty("quarkus.otel.exporter.otlp.traces.endpoint", jaeger::getCollectorUrl) | ||
.withProperty("quarkus.datasource.jdbc.telemetry", "true") | ||
.withProperty("quarkus.datasource.username", database.getUser()) | ||
.withProperty("quarkus.datasource.password", database.getPassword()) | ||
.withProperty("quarkus.datasource.jdbc.url", database::getJdbcUrl); | ||
} | ||
} |
20 changes: 19 additions & 1 deletion
20
...rc/test/java/io/quarkus/ts/transactions/OpenShiftPostgresqlTransactionGeneralUsageIT.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 |
---|---|---|
@@ -1,8 +1,26 @@ | ||
package io.quarkus.ts.transactions; | ||
|
||
import io.quarkus.test.bootstrap.PostgresqlService; | ||
import io.quarkus.test.bootstrap.RestService; | ||
import io.quarkus.test.scenarios.OpenShiftScenario; | ||
import io.quarkus.test.services.Container; | ||
import io.quarkus.test.services.QuarkusApplication; | ||
|
||
@OpenShiftScenario | ||
public class OpenShiftPostgresqlTransactionGeneralUsageIT extends PostgresqlTransactionGeneralUsageIT { | ||
public class OpenShiftPostgresqlTransactionGeneralUsageIT extends AbstractPostgresqlTransactionGeneralUsageIT { | ||
|
||
@Container(image = "${postgresql.latest.image}", port = POSTGRESQL_PORT, expectedLog = "listening on IPv4 address") | ||
static final PostgresqlService database = new PostgresqlService() | ||
// following env variable is accepted by PG images from Red Hat registry | ||
.withProperty("POSTGRESQL_MAX_PREPARED_TRANSACTIONS", "100") | ||
.withProperty("PGDATA", "/tmp/psql"); | ||
|
||
@QuarkusApplication | ||
public static final RestService app = createQuarkusApp(database); | ||
|
||
@Override | ||
protected RestService getApp() { | ||
return app; | ||
} | ||
|
||
} |
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