Skip to content

Commit

Permalink
Merge branch '1.1.x' into 1.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
shakuzen committed Jan 4, 2020
2 parents 647dd08 + 2aabf36 commit 1850f6a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ private void assertThatMonitorShouldExposeMetricsWhenStatsEnabled() {
void deprecatedMonitorShouldNotExposeMetricsWhenStatsNotEnabled() {
EntityManagerFactory entityManagerFactory = createMockEntityManagerFactory(false);
HibernateMetrics.monitor(registry, entityManagerFactory, "entityManagerFactory");
assertThat(registry.find("hibernate.sessions.open").gauge()).isNull();
assertThat(registry.find("hibernate.sessions.open").functionCounter()).isNull();
}

@Test
void monitorShouldNotExposeMetricsWhenStatsNotEnabled() {
SessionFactory sessionFactory = createMockSessionFactory(true);
SessionFactory sessionFactory = createMockSessionFactory(false);
HibernateMetrics.monitor(registry, sessionFactory, "sessionFactory");
assertThat(registry.find("hibernate.sessions.open").gauge()).isNull();
assertThat(registry.find("hibernate.sessions.open").functionCounter()).isNull();
}

}

0 comments on commit 1850f6a

Please sign in to comment.