Fix ErrorBindingTests

This commit is contained in:
Oleg Zhurakousky
2022-06-07 12:22:22 +02:00
parent 3c946e8c3d
commit 3a7ab48d51

View File

@@ -17,8 +17,8 @@
package org.springframework.cloud.stream.binder;
import java.util.function.Consumer;
import java.util.function.Function;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.boot.WebApplicationType;
@@ -39,7 +39,6 @@ import static org.assertj.core.api.Assertions.assertThat;
public class ErrorBindingTests {
@Test
@Disabled
public void testConfigurationWithDefaultErrorHandler() {
ApplicationContext context = new SpringApplicationBuilder(
TestChannelBinderConfiguration.getCompleteConfiguration(
@@ -61,7 +60,6 @@ public class ErrorBindingTests {
}
@Test
@Disabled
void testConfigurationWithBindingSpecificErrorHandler() {
ApplicationContext context = new SpringApplicationBuilder(
TestChannelBinderConfiguration.getCompleteConfiguration(
@@ -92,6 +90,13 @@ public class ErrorBindingTests {
private int counter;
@Bean
public Function<String, String> handle() {
return v -> {
this.counter++;
throw new RuntimeException("Intentional");
};
}
@Bean
public Consumer<Object> errorHandler() {
@@ -107,6 +112,14 @@ public class ErrorBindingTests {
private int counter;
@Bean
public Function<String, String> handle() {
return v -> {
this.counter++;
throw new RuntimeException("Intentional");
};
}
@Bean
public Consumer<Object> errorHandler() {
return v -> {