Skip to content

Commit

Permalink
Enable trace log
Browse files Browse the repository at this point in the history
Signed-off-by: bowenlan-amzn <[email protected]>
  • Loading branch information
bowenlan-amzn committed Sep 8, 2023
1 parent 78c53f4 commit d47106d
Showing 1 changed file with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -723,14 +723,12 @@ class ResponseInterceptorIT : RollupRestTestCase() {

// Validate result from searching rollup-nyc-taxi-data, searching nyc-taxi-data
val start = System.currentTimeMillis()
val r = client().makeRequest(
var r = client().makeRequest(
"PUT", "_cluster/settings",
StringEntity(
"""
{
"transient": {
"logger.org.opensearch.indexmanagement.rollup":"DEBUG",
"logger.org.opensearch.jobscheduler":"DEBUG",
"logger.org.opensearch.transport": "Trace"
}
}
Expand All @@ -743,6 +741,21 @@ class ResponseInterceptorIT : RollupRestTestCase() {
var searchAllResponse = client().makeRequest("POST", "/rollup-nyc-taxi-data,nyc-taxi-data/_search", emptyMap(), StringEntity(aggReq, ContentType.APPLICATION_JSON))
logger.info("search call finished ${Date()}")

r = client().makeRequest(
"PUT", "_cluster/settings",
StringEntity(
"""
{
"transient": {
"logger.org.opensearch.transport": null
}
}
""".trimIndent(),
ContentType.APPLICATION_JSON
)
)
logger.info("disable trace log $r")

assertTrue(searchAllResponse.restStatus() == RestStatus.OK)
var responseAggs = searchAllResponse.asMap()["aggregations"] as Map<String, Map<String, Any>>
assertEquals(
Expand Down

0 comments on commit d47106d

Please sign in to comment.