From d56d116f139b885874443fad1df05eb0dc01e6bd Mon Sep 17 00:00:00 2001 From: Mateusz Rzeszutek Date: Tue, 26 Jan 2021 16:36:55 +0100 Subject: [PATCH] Fix tests --- .../instrumentation/api/db/SqlSanitizerTest.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/javaagent-api/src/test/groovy/io/opentelemetry/javaagent/instrumentation/api/db/SqlSanitizerTest.groovy b/javaagent-api/src/test/groovy/io/opentelemetry/javaagent/instrumentation/api/db/SqlSanitizerTest.groovy index c10f9f882f15..cd2f44a92cd3 100644 --- a/javaagent-api/src/test/groovy/io/opentelemetry/javaagent/instrumentation/api/db/SqlSanitizerTest.groovy +++ b/javaagent-api/src/test/groovy/io/opentelemetry/javaagent/instrumentation/api/db/SqlSanitizerTest.groovy @@ -143,7 +143,7 @@ class SqlSanitizerTest extends Specification { def query = sb.toString() expect: - def sanitizedQuery = query.replace('=123', '=?').substring(0, SqlSanitizer.LIMIT) + def sanitizedQuery = query.replace('=123', '=?').substring(0, AutoSqlSanitizer.LIMIT) SqlSanitizer.sanitize(query) == new SqlStatementInfo(sanitizedQuery, "SELECT", "table") } @@ -171,7 +171,7 @@ class SqlSanitizerTest extends Specification { for (int i = 0; i < 10000; i++) { s += String.valueOf(i) } - assert s.substring(0, SqlSanitizer.LIMIT) == SqlSanitizer.sanitize(s).getFullStatement() + assert s.substring(0, AutoSqlSanitizer.LIMIT) == SqlSanitizer.sanitize(s).getFullStatement() } def "test 32k truncation"() { @@ -182,7 +182,7 @@ class SqlSanitizerTest extends Specification { } String sanitized = SqlSanitizer.sanitize(s.toString()).getFullStatement() System.out.println(sanitized.length()) - assert sanitized.length() <= SqlSanitizer.LIMIT + assert sanitized.length() <= AutoSqlSanitizer.LIMIT assert !sanitized.contains("1234") }