Skip to content

Shutdown test executors in -core #2334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2018
Merged

Conversation

garyrussell
Copy link
Contributor

  • also add log adjuster for ftp test that sometimes fails

- don't use `ExecutorService` as `@Bean` - spring can't stop them
- also add log adjuster for ftp test that sometimes fails
@@ -141,8 +142,8 @@ public void testReplyBeforeRequest() throws Exception {
handler.setOutputChannel(outputChannel);
handler.setBeanFactory(mock(BeanFactory.class));
handler.afterPropertiesSet();
Executors.newSingleThreadExecutor()
.execute(() -> handler.trigger(MessageBuilder.withPayload("bar").setCorrelationId("foo").build()));
ExecutorService exec = Executors.newSingleThreadExecutor();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the #2329 I went the way to expose a SimpleAsyncTaskExecutor as a class property do not instantiate per test and don't care about shutdown, but I think it really doesn't matter from test perspective.

So, merging...

@artembilan artembilan merged commit 8aa91d1 into spring-projects:master Jan 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants