File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed
main/java/com/gvenzl/info
test/java/com/gvenzl/info Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 2
2
<modelVersion >4.0.0</modelVersion >
3
3
<groupId >com.gvenzl</groupId >
4
4
<artifactId >oracleperfutils</artifactId >
5
- <version >0.1.4 </version >
5
+ <version >0.1.5 </version >
6
6
<name >Oracle Performance Utilities</name >
7
7
<description >A collection of APIs that interface with various Oracle performance tuning features.</description >
8
8
<build >
20
20
<dependencies >
21
21
<dependency >
22
22
<groupId >com.oracle</groupId >
23
- <artifactId >ojdbc7 </artifactId >
24
- <version >12.1 .0.2 </version >
23
+ <artifactId >ojdbc8 </artifactId >
24
+ <version >12.2 .0.1 </version >
25
25
</dependency >
26
26
<dependency >
27
27
<groupId >junit</groupId >
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public class DatabaseInfo {
33
33
public DatabaseInfo (Connection conn ) throws SQLException {
34
34
35
35
if (null == conn || conn .isClosed ()) {
36
- throw new SQLException ("No connection to the database" );
36
+ throw new SQLException ("No connection to the database. " );
37
37
}
38
38
39
39
PreparedStatement psDBInfo = conn .prepareStatement (
Original file line number Diff line number Diff line change 7
7
8
8
import java .sql .Connection ;
9
9
import java .sql .DriverManager ;
10
+ import java .sql .ResultSet ;
10
11
import java .sql .SQLException ;
11
12
12
13
import org .junit .Assert ;
@@ -62,7 +63,11 @@ public void test_getPlatformName() throws SQLException {
62
63
public void test_getVersion () throws SQLException {
63
64
System .out .println ("test_getVersion()" );
64
65
DatabaseInfo dbInfo = new DatabaseInfo (conn );
65
- String expected = "Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production" ;
66
+
67
+ ResultSet rslt = conn .createStatement ().executeQuery ("SELECT banner FROM V$VERSION WHERE banner LIKE 'Oracle Database%'" );
68
+ rslt .next ();
69
+ String expected = rslt .getString (1 );
70
+
66
71
Assert .assertEquals (expected , dbInfo .getVersion ());
67
72
}
68
73
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ public void test_getDbDomain() throws SQLException {
133
133
@ Test
134
134
public void test_getDbName () throws SQLException {
135
135
System .out .println ("test_getDbName()" );
136
- Assert .assertEquals (CDBNAME , ConnectionInfoFactory .getConnectionInfo (conn ).getDbName ());
136
+ Assert .assertEquals (CONTAINERNAME , ConnectionInfoFactory .getConnectionInfo (conn ).getDbName ());
137
137
}
138
138
139
139
@ Test
You can’t perform that action at this time.
0 commit comments