Skip to content

Commit

Permalink
reduce sleep time
Browse files Browse the repository at this point in the history
  • Loading branch information
ian28223 committed Feb 1, 2021
1 parent db6a62d commit 66f77d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/test/java/org/datadog/jmxfetch/TestInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void testRefreshBeans() throws Exception {
// We register an additional mbean
registerMBean(testApp, "org.datadog.jmxfetch.test:iteration=one");
log.info("sleeping before the next collection");
Thread.sleep(5000);
Thread.sleep(1500);

// We run a second collection. refresh_beans_initial should be due.
run();
Expand All @@ -176,7 +176,7 @@ public void testRefreshBeans() throws Exception {
// We register additional mbean
registerMBean(testApp, "org.datadog.jmxfetch.test:iteration=two");
log.info("sleeping before the next collection");
Thread.sleep(5000);
Thread.sleep(1500);

// We run a third collection. No change expected; refresh_beans not due.
run();
Expand All @@ -186,7 +186,7 @@ public void testRefreshBeans() throws Exception {
assertEquals(15, metrics.size());

log.info("sleeping before the next collection");
Thread.sleep(5000);
Thread.sleep(1500);

// We run the last collection. refresh_beans should be due.
run();
Expand Down
6 changes: 3 additions & 3 deletions src/test/resources/jmx_refresh_beans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ init_config:

instances:
- process_name_regex: .*surefire.*
min_collection_interval: 5
refresh_beans_initial: 5
refresh_beans: 10
min_collection_interval: 1
refresh_beans_initial: 1
refresh_beans: 3
name: jmx_test_instance
conf:
- include:
Expand Down

0 comments on commit 66f77d8

Please sign in to comment.