Skip to content

Commit

Permalink
[oracle-free] Support oracle.jdbc.OracleDriver (testcontainers#8796)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdouillard authored and lizhou1111 committed Jul 13, 2024
1 parent 78f561b commit 86ce883
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ public Set<Integer> getLivenessCheckPortNumbers() {

@Override
public String getDriverClassName() {
return "oracle.jdbc.driver.OracleDriver";
try {
Class.forName("oracle.jdbc.OracleDriver");
return "oracle.jdbc.OracleDriver";
} catch (ClassNotFoundException e) {
return "oracle.jdbc.driver.OracleDriver";
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ public Set<Integer> getLivenessCheckPortNumbers() {

@Override
public String getDriverClassName() {
return "oracle.jdbc.driver.OracleDriver";
try {
Class.forName("oracle.jdbc.OracleDriver");
return "oracle.jdbc.OracleDriver";
} catch (ClassNotFoundException e) {
return "oracle.jdbc.driver.OracleDriver";
}
}

@Override
Expand Down

0 comments on commit 86ce883

Please sign in to comment.