Skip to content

Commit

Permalink
revert line breaks and changes to unrelated files
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-wong committed Sep 24, 2024
1 parent 1cad8b1 commit b9f8ed0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public static AgentScope start(@Advice.This final DataSource ds) {
// Don't want to generate a new top-level span
return null;
}

final AgentSpan span = startSpan(DATABASE_CONNECTION);
DECORATE.afterStart(span);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ abstract class RemoteJDBCInstrumentationTest extends VersionedNamingTestBase {
mysql.start()
PortUtils.waitForPortToOpen(mysql.getHost(), mysql.getMappedPort(MySQLContainer.MYSQL_PORT), 5, TimeUnit.SECONDS)
jdbcUrls.put(MYSQL, "${mysql.getJdbcUrl()}")
sqlserver = new MSSQLServerContainer(MSSQLServerContainer.IMAGE).acceptLicense().withPassword(jdbcPasswords.get(SQLSERVER))
sqlserver = new MSSQLServerContainer().acceptLicense().withPassword(jdbcPasswords.get(SQLSERVER))
sqlserver.start()
PortUtils.waitForPortToOpen(sqlserver.getHost(), sqlserver.getMappedPort(MSSQLServerContainer.MS_SQL_SERVER_PORT), 5, TimeUnit.SECONDS)
jdbcUrls.put(SQLSERVER, "${sqlserver.getJdbcUrl()};DatabaseName=${dbName.get(SQLSERVER)}")
Expand All @@ -202,8 +202,8 @@ abstract class RemoteJDBCInstrumentationTest extends VersionedNamingTestBase {
postgres?.close()
mysql?.close()
sqlserver?.close()

}

def "basic statement with #connection.getClass().getCanonicalName() on #driver generates spans"() {
setup:
injectSysConfig(DB_CLIENT_HOST_SPLIT_BY_INSTANCE, "$renameService")
Expand All @@ -219,7 +219,6 @@ abstract class RemoteJDBCInstrumentationTest extends VersionedNamingTestBase {
def addDbmTag = dbmTraceInjected()
resultSet.next()
resultSet.getInt(1) == 3

if (driver == POSTGRESQL || driver == MYSQL || !addDbmTag) {
assertTraces(1) {
trace(2) {
Expand All @@ -243,7 +242,6 @@ abstract class RemoteJDBCInstrumentationTest extends VersionedNamingTestBase {
// since Connection.getClientInfo will not provide the username
"$Tags.DB_USER" { it == null || it == jdbcUserNames.get(driver) }
"$Tags.DB_OPERATION" operation

if (addDbmTag) {
"$InstrumentationTags.DBM_TRACE_INJECTED" true
}
Expand Down

0 comments on commit b9f8ed0

Please sign in to comment.