Skip to content

Commit 742ada5

Browse files
committed
fix test
1 parent 99c8aa7 commit 742ada5

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

dd-java-agent/instrumentation/jdbc/src/test/groovy/JDBCDecoratorParseDBInfoTestBase.groovy

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ abstract class JDBCDecoratorParseDBInfoTestBase extends InstrumentationSpecifica
3333

3434
then:
3535
if (shouldFetchMetadata()) {
36-
result.type == "postgresql"
37-
result.host == "testhost"
38-
result.port == 5432
39-
result.db == "testdb"
36+
assert result.type == "postgresql"
37+
assert result.host == "testhost"
38+
assert result.port == 5432
39+
assert result.db == "testdb"
4040
} else {
41-
result == DBInfo.DEFAULT
41+
assert result == DBInfo.DEFAULT
4242
}
4343
}
4444

@@ -50,20 +50,21 @@ abstract class JDBCDecoratorParseDBInfoTestBase extends InstrumentationSpecifica
5050
clientInfo.setProperty("warehouse", "my-test-warehouse") // we'll check that property to know if clientInfo were used
5151
def connection = Mock(Connection) {
5252
getMetaData() >> (shouldFetchMetadata() ? metadata : { assert false })
53+
getClientInfo() >> clientInfo
5354
}
5455

5556
when:
5657
def result = JDBCDecorator.parseDBInfoFromConnection(connection)
5758

5859
then:
5960
if (shouldFetchMetadata()) {
60-
result.type == "postgresql"
61-
result.host == "testhost"
62-
result.port == 5432
63-
result.db == "testdb"
64-
result.warehouse == "my-test-warehouse"
61+
assert result.type == "postgresql"
62+
assert result.host == "testhost"
63+
assert result.port == 5432
64+
assert result.db == "testdb"
65+
assert result.warehouse == "my-test-warehouse"
6566
} else {
66-
result == DBInfo.DEFAULT
67+
assert result == DBInfo.DEFAULT
6768
}
6869
}
6970

0 commit comments

Comments
 (0)