Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Dropwizard Metrics integration test #1482

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions integration-tests/metrics-expected-changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3028,17 +3028,16 @@
SharedMetricRegistries.getDefault();
});
- assertTrue(exception.getMessage().contains("Default registry name has not been set."));
+ assertThat(exception.getMessage().contains("Default registry name has not been set.")).isTrue();
+ assertThat(exception.getMessage()).contains("Default registry name has not been set.");
}

@Test
@@ -81,7 +80,8 @@ class SharedMetricRegistriesTest {
@@ -81,7 +80,7 @@ class SharedMetricRegistriesTest {
SharedMetricRegistries.setDefault("foobah");
SharedMetricRegistries.setDefault("borg");
});
- assertTrue(exception.getMessage().contains("Default metric registry name is already set."));
+ assertThat(exception.getMessage().contains("Default metric registry name is already set."))
+ .isTrue();
+ assertThat(exception.getMessage()).contains("Default metric registry name is already set.");
}

@Test
Expand Down Expand Up @@ -4943,27 +4942,25 @@
SharedHealthCheckRegistries.getDefault();
});
- assertTrue(exception.getMessage().contains("Default registry name has not been set."));
+ assertThat(exception.getMessage().contains("Default registry name has not been set.")).isTrue();
+ assertThat(exception.getMessage()).contains("Default registry name has not been set.");
}

@Test
@@ -85,7 +84,8 @@ class SharedHealthCheckRegistriesTest {
@@ -85,7 +84,7 @@ class SharedHealthCheckRegistriesTest {
SharedHealthCheckRegistries.setDefault("default");
SharedHealthCheckRegistries.setDefault("default");
});
- assertTrue(exception.getMessage().contains("Default health check registry is already set."));
+ assertThat(exception.getMessage().contains("Default health check registry is already set."))
+ .isTrue();
+ assertThat(exception.getMessage()).contains("Default health check registry is already set.");
}

@Test
@@ -97,6 +97,7 @@ class SharedHealthCheckRegistriesTest {
@@ -97,6 +96,6 @@ class SharedHealthCheckRegistriesTest {
SharedHealthCheckRegistries.setDefault("default", new HealthCheckRegistry());
SharedHealthCheckRegistries.setDefault("default", new HealthCheckRegistry());
});
- assertTrue(exception.getMessage().contains("Default health check registry is already set."));
+ assertThat(exception.getMessage().contains("Default health check registry is already set."))
+ .isTrue();
+ assertThat(exception.getMessage()).contains("Default health check registry is already set.");
}
}
--- a/metrics-healthchecks/src/test/java/io/dropwizard/metrics5/health/jvm/ThreadDeadlockHealthCheckTest.java
Expand Down Expand Up @@ -5137,7 +5134,7 @@
- Mockito.verify(registry, Mockito.atLeast(1)).registerGauge(argumentCaptor.capture(), any());
- assertTrue(argumentCaptor.getValue().getKey().contains("some-other-name"));
+ verify(registry, atLeast(1)).registerGauge(argumentCaptor.capture(), any());
+ assertThat(argumentCaptor.getValue().getKey().contains("some-other-name")).isTrue();
+ assertThat(argumentCaptor.getValue().getKey()).contains("some-other-name");
}
}
--- a/metrics-httpclient/src/test/java/io/dropwizard/metrics5/httpclient/InstrumentedHttpClientsTest.java
Expand Down Expand Up @@ -5215,7 +5212,7 @@
- Mockito.verify(registry, Mockito.atLeast(1)).registerGauge(argumentCaptor.capture(), any());
- assertTrue(argumentCaptor.getValue().getKey().contains("some-other-name"));
+ verify(registry, atLeast(1)).registerGauge(argumentCaptor.capture(), any());
+ assertThat(argumentCaptor.getValue().getKey().contains("some-other-name")).isTrue();
+ assertThat(argumentCaptor.getValue().getKey()).contains("some-other-name");
}
}
--- a/metrics-httpclient5/src/test/java/io/dropwizard/metrics5/httpclient5/InstrumentedHttpAsyncClientsTest.java
Expand Down Expand Up @@ -5305,7 +5302,7 @@
- Mockito.verify(registry, Mockito.atLeast(1)).registerGauge(argumentCaptor.capture(), any());
- assertTrue(argumentCaptor.getValue().getKey().contains("some-other-name"));
+ verify(registry, atLeast(1)).registerGauge(argumentCaptor.capture(), any());
+ assertThat(argumentCaptor.getValue().getKey().contains("some-other-name")).isTrue();
+ assertThat(argumentCaptor.getValue().getKey()).contains("some-other-name");
}
}
--- a/metrics-httpclient5/src/test/java/io/dropwizard/metrics5/httpclient5/InstrumentedHttpClientsTest.java
Expand Down