-
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.
Enable OracleOpenTelemetryJdbcInstrumentationTest
- Loading branch information
1 parent
b6f8c74
commit 7bf776a
Showing
4 changed files
with
136 additions
and
0 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
30 changes: 30 additions & 0 deletions
30
...dbc-instrumentation/src/test/java/io/quarkus/it/opentelemetry/OracleLifecycleManager.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,30 @@ | ||
package io.quarkus.it.opentelemetry; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager; | ||
|
||
public class OracleLifecycleManager implements QuarkusTestResourceLifecycleManager { | ||
|
||
@Override | ||
public Map<String, String> start() { | ||
Map<String, String> properties = new HashMap<>(); | ||
properties.put("quarkus.datasource.oracle.jdbc.url", "jdbc:oracle:thin:@localhost:1521/FREEPDB1"); | ||
properties.put("quarkus.datasource.oracle.password", "quarkus"); | ||
properties.put("quarkus.datasource.oracle.username", "SYSTEM"); | ||
properties.put("quarkus.hibernate-orm.oracle.database.generation", "drop-and-create"); | ||
properties.put("quarkus.hibernate-orm.oracle.active", "true"); | ||
properties.put("quarkus.hibernate-orm.mariadb.active", "false"); | ||
properties.put("quarkus.hibernate-orm.postgresql.active", "false"); | ||
properties.put("quarkus.hibernate-orm.db2.active", "false"); | ||
|
||
return properties; | ||
} | ||
|
||
@Override | ||
public void stop() { | ||
// EMPTY | ||
} | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
...n/src/test/java/io/quarkus/it/opentelemetry/OracleOpenTelemetryJdbcInstrumentationIT.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,8 @@ | ||
package io.quarkus.it.opentelemetry; | ||
|
||
import io.quarkus.test.junit.QuarkusIntegrationTest; | ||
|
||
@QuarkusIntegrationTest | ||
public class OracleOpenTelemetryJdbcInstrumentationIT extends OracleOpenTelemetryJdbcInstrumentationTest { | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
...src/test/java/io/quarkus/it/opentelemetry/OracleOpenTelemetryJdbcInstrumentationTest.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,17 @@ | ||
package io.quarkus.it.opentelemetry; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import io.quarkus.test.common.QuarkusTestResource; | ||
import io.quarkus.test.junit.QuarkusTest; | ||
|
||
@QuarkusTest | ||
@QuarkusTestResource(value = OracleLifecycleManager.class, restrictToAnnotatedClass = true) | ||
public class OracleOpenTelemetryJdbcInstrumentationTest extends OpenTelemetryJdbcInstrumentationTest { | ||
|
||
@Test | ||
void testOracleQueryTraced() { | ||
testQueryTraced("oracle", "OracleHit"); | ||
} | ||
|
||
} |