From 6a3b60ef2619a34274149e90ae32f409ab127aa3 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Vrielynck <43749206+pvriel@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:42:27 +0100 Subject: [PATCH] [ALFREDOPS-860] temp progress --- alfred-telemetry-platform/build.gradle | 3 +-- .../alfrescointegration/DataSourceBeanPostProcessorTest.java | 2 +- .../clustering/ClusteringMetricsBeanPostProcessorTest.java | 4 ++-- build.gradle | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/alfred-telemetry-platform/build.gradle b/alfred-telemetry-platform/build.gradle index febab08c..b89dfbf0 100644 --- a/alfred-telemetry-platform/build.gradle +++ b/alfred-telemetry-platform/build.gradle @@ -48,11 +48,10 @@ dependencies { testImplementation "org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}" testImplementation "org.junit.jupiter:junit-jupiter-params:${junitJupiterVersion}" testImplementation "org.mockito:mockito-core:${mockitoVersion}" + testImplementation "org.mockito:mockito-inline:${mockitoVersion}" testImplementation "org.mockito:mockito-junit-jupiter:${mockitoVersion}" testImplementation "org.hamcrest:hamcrest-all:${hamcrestVersion}" testImplementation "org.awaitility:awaitility:${awaitilityVersion}" - testImplementation "org.mockito:mockito-inline:${mockitoVersion}" - testImplementation "net.bytebuddy:byte-buddy:${byteBuddyVersion}" testRuntimeOnly 'org.alfresco:alfresco-remote-api' } diff --git a/alfred-telemetry-platform/src/test/java/eu/xenit/alfred/telemetry/alfrescointegration/DataSourceBeanPostProcessorTest.java b/alfred-telemetry-platform/src/test/java/eu/xenit/alfred/telemetry/alfrescointegration/DataSourceBeanPostProcessorTest.java index 0f69fe86..cd5b2750 100644 --- a/alfred-telemetry-platform/src/test/java/eu/xenit/alfred/telemetry/alfrescointegration/DataSourceBeanPostProcessorTest.java +++ b/alfred-telemetry-platform/src/test/java/eu/xenit/alfred/telemetry/alfrescointegration/DataSourceBeanPostProcessorTest.java @@ -91,7 +91,7 @@ private void validate(BeanDefinitionRegistry registry, ApplicationContext contex if(hasDataSource) { assertNotNull(context.getBean(DATASOURCE_BEAN_ID)); } else { - assertThrows(BeansException.class, () -> context.getBean(DATASOURCE_BEAN_ID)); + assertThrows(NoSuchBeanException.class, () -> context.getBean(DATASOURCE_BEAN_ID)); } assertThat(registry.containsBeanDefinition(BASIC_DATASOURCE_BEAN_ID), is(hasBasicDataSource)); diff --git a/alfred-telemetry-platform/src/test/java/eu/xenit/alfred/telemetry/binder/clustering/ClusteringMetricsBeanPostProcessorTest.java b/alfred-telemetry-platform/src/test/java/eu/xenit/alfred/telemetry/binder/clustering/ClusteringMetricsBeanPostProcessorTest.java index 23e88aed..d78077aa 100644 --- a/alfred-telemetry-platform/src/test/java/eu/xenit/alfred/telemetry/binder/clustering/ClusteringMetricsBeanPostProcessorTest.java +++ b/alfred-telemetry-platform/src/test/java/eu/xenit/alfred/telemetry/binder/clustering/ClusteringMetricsBeanPostProcessorTest.java @@ -11,6 +11,7 @@ import java.util.Properties; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.mockito.Mockito; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.support.BeanDefinitionRegistry; @@ -19,7 +20,7 @@ class ClusteringMetricsBeanPostProcessorTest { ClusteringMetricsBeanPostProcessor clusteringMetricsBeanPostProcessor; @BeforeEach - private void init() { + public void init() { clusteringMetricsBeanPostProcessor = new ClusteringMetricsBeanPostProcessor(); } @@ -39,6 +40,5 @@ void testCommunityAndClusteringMetricsEnabled() { clusteringMetricsBeanPostProcessor.postProcessBeanDefinitionRegistry(beanDefinitionRegistry); verify(beanDefinitionRegistry, times(0)) .registerBeanDefinition(eq(ClusteringMetricsBeanPostProcessor.CLUSTERING_METRICS_BEAN_ID), any()); - ; } } \ No newline at end of file diff --git a/build.gradle b/build.gradle index c4d00da9..31570004 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ allprojects { jvmExtrasVersion = '0.1.2' junitJupiterVersion = '5.4.2' - mockitoVersion = '4.5.1' + mockitoVersion = '5.2.0' byteBuddyVersion = '1.14.6' hamcrestVersion = '1.3' awaitilityVersion = '4.1.0'