mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-08 02:09:06 +00:00
Merge branch '4.0.x'
This commit is contained in:
+2
-2
@@ -46,7 +46,6 @@ import io.micrometer.tracing.brave.bridge.W3CPropagation;
|
||||
import io.micrometer.tracing.exporter.SpanExportingPredicate;
|
||||
import io.micrometer.tracing.exporter.SpanFilter;
|
||||
import io.micrometer.tracing.exporter.SpanReporter;
|
||||
import org.assertj.core.api.Assertions;
|
||||
import org.assertj.core.api.InstanceOfAssertFactories;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -63,6 +62,7 @@ import org.springframework.core.annotation.Order;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatException;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
/**
|
||||
@@ -401,7 +401,7 @@ class BraveAutoConfigurationTests {
|
||||
if (factory instanceof CompositePropagationFactory compositePropagationFactory) {
|
||||
return compositePropagationFactory.getInjectors().toList();
|
||||
}
|
||||
Assertions.fail("Expected CompositePropagationFactory, found %s".formatted(factory.getClass()));
|
||||
fail("Expected CompositePropagationFactory, found %s".formatted(factory.getClass()));
|
||||
throw new AssertionError("Unreachable");
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -19,7 +19,6 @@ package org.springframework.boot.mustache.autoconfigure;
|
||||
import java.util.Collections;
|
||||
|
||||
import com.samskivert.mustache.Mustache;
|
||||
import org.assertj.core.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -30,6 +29,8 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Integration Tests for {@link MustacheAutoConfiguration} outside of a web application.
|
||||
*
|
||||
@@ -44,8 +45,7 @@ class MustacheStandaloneIntegrationTests {
|
||||
|
||||
@Test
|
||||
void directCompilation() {
|
||||
Assertions
|
||||
.assertThat(this.compiler.compile("Hello: {{world}}").execute(Collections.singletonMap("world", "World")))
|
||||
assertThat(this.compiler.compile("Hello: {{world}}").execute(Collections.singletonMap("world", "World")))
|
||||
.isEqualTo("Hello: World");
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -36,7 +36,6 @@ import jakarta.validation.ValidatorFactory;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.AfterReturning;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.assertj.core.api.Assertions;
|
||||
import org.assertj.core.api.InstanceOfAssertFactories;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -133,6 +132,7 @@ import org.springframework.web.util.pattern.PathPattern;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.assertj.core.api.Assertions.setExtractBareNamePropertyMethods;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.BDDMockito.then;
|
||||
import static org.mockito.Mockito.mock;
|
||||
@@ -488,7 +488,7 @@ class WebFluxAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
void cachePeriod() {
|
||||
Assertions.setExtractBareNamePropertyMethods(false);
|
||||
setExtractBareNamePropertyMethods(false);
|
||||
this.contextRunner.withPropertyValues("spring.web.resources.cache.period:5").run((context) -> {
|
||||
Map<PathPattern, Object> handlerMap = getHandlerMap(context);
|
||||
assertThat(handlerMap).hasSize(2);
|
||||
@@ -499,12 +499,12 @@ class WebFluxAutoConfigurationTests {
|
||||
}
|
||||
}
|
||||
});
|
||||
Assertions.setExtractBareNamePropertyMethods(true);
|
||||
setExtractBareNamePropertyMethods(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
void cacheControl() {
|
||||
Assertions.setExtractBareNamePropertyMethods(false);
|
||||
setExtractBareNamePropertyMethods(false);
|
||||
this.contextRunner
|
||||
.withPropertyValues("spring.web.resources.cache.cachecontrol.max-age:5",
|
||||
"spring.web.resources.cache.cachecontrol.proxy-revalidate:true")
|
||||
@@ -518,7 +518,7 @@ class WebFluxAutoConfigurationTests {
|
||||
}
|
||||
}
|
||||
});
|
||||
Assertions.setExtractBareNamePropertyMethods(true);
|
||||
setExtractBareNamePropertyMethods(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user