Close TaskScheduler in tests

* Add `@DirtiesContext` to some tests where `TaskScheduler` is used
This commit is contained in:
Artem Bilan
2024-01-30 14:29:40 -05:00
parent 62fd3e6c20
commit 0ba60bc752
15 changed files with 153 additions and 194 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@ import org.springframework.integration.context.IntegrationContextUtils;
import org.springframework.integration.test.util.TestUtils;
import org.springframework.messaging.MessageChannel;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.util.ErrorHandler;
@@ -41,6 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* @since 1.0.3
*/
@SpringJUnitConfig
@DirtiesContext
public class DefaultConfigurationTests {
@Autowired