Skip to content

Commit ef2575a

Browse files
garyrusselltzolov
authored andcommitted
Increase Timeouts in FTP RotatingServersTests
Some unknown delays on MacOS cause the tests to fail.
1 parent 9227acd commit ef2575a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spring-integration-ftp/src/test/java/org/springframework/integration/ftp/inbound/RotatingServersTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2022 the original author or authors.
2+
* Copyright 2018-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -134,7 +134,7 @@ public void extraCleanUp(TestInfo info) {
134134
public void testStandard() throws Exception {
135135
try (AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(StandardConfig.class)) {
136136
StandardConfig config = ctx.getBean(StandardConfig.class);
137-
assertThat(config.latch.await(10, TimeUnit.SECONDS)).isTrue();
137+
assertThat(config.latch.await(30, TimeUnit.SECONDS)).isTrue();
138138
ctx.getBean(SourcePollingChannelAdapter.class).stop();
139139
List<Integer> sfCalls = config.sessionSources.stream().limit(17).collect(Collectors.toList());
140140
assertThat(sfCalls).containsExactly(1, 1, 1, 2, 2, 2, 3, 3, 3, 1, 1, 2, 2, 3, 3, 1, 1);
@@ -152,7 +152,7 @@ public void testStandard() throws Exception {
152152
public void testFair() throws Exception {
153153
try (AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(FairConfig.class)) {
154154
StandardConfig config = ctx.getBean(StandardConfig.class);
155-
assertThat(config.latch.await(10, TimeUnit.SECONDS)).isTrue();
155+
assertThat(config.latch.await(30, TimeUnit.SECONDS)).isTrue();
156156
ctx.getBean(SourcePollingChannelAdapter.class).stop();
157157
List<Integer> sfCalls = config.sessionSources.stream().limit(17).collect(Collectors.toList());
158158
assertThat(sfCalls).containsExactly(1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3);
@@ -170,7 +170,7 @@ public void testFair() throws Exception {
170170
public void testVariableLocalDir() throws Exception {
171171
try (ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext(VariableLocalConfig.class)) {
172172
StandardConfig config = ctx.getBean(StandardConfig.class);
173-
assertThat(config.latch.await(10, TimeUnit.SECONDS)).isTrue();
173+
assertThat(config.latch.await(30, TimeUnit.SECONDS)).isTrue();
174174
ctx.getBean(SourcePollingChannelAdapter.class).stop();
175175
List<Integer> sfCalls = config.sessionSources.stream().limit(17).collect(Collectors.toList());
176176
assertThat(sfCalls).containsExactly(1, 1, 1, 2, 2, 2, 3, 3, 3, 1, 1, 2, 2, 3, 3, 1, 1);
@@ -188,7 +188,7 @@ public void testVariableLocalDir() throws Exception {
188188
public void testStreaming() throws Exception {
189189
try (AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(StreamingConfig.class)) {
190190
StandardConfig config = ctx.getBean(StreamingConfig.class);
191-
assertThat(config.latch.await(10, TimeUnit.SECONDS)).isTrue();
191+
assertThat(config.latch.await(30, TimeUnit.SECONDS)).isTrue();
192192
ctx.getBean(SourcePollingChannelAdapter.class).stop();
193193
List<Integer> sfCalls = config.sessionSources.stream().limit(17).collect(Collectors.toList());
194194
// there's an extra getSession() with this adapter in listFiles
@@ -211,7 +211,7 @@ public void testStreaming() throws Exception {
211211
public void testFairStreaming() throws Exception {
212212
try (ConfigurableApplicationContext ctx = new AnnotationConfigApplicationContext(FairStreamingConfig.class)) {
213213
StandardConfig config = ctx.getBean(StandardConfig.class);
214-
assertThat(config.latch.await(10, TimeUnit.SECONDS)).isTrue();
214+
assertThat(config.latch.await(30, TimeUnit.SECONDS)).isTrue();
215215
ctx.getBean(SourcePollingChannelAdapter.class).stop();
216216
List<Integer> sfCalls = config.sessionSources.stream().limit(17).collect(Collectors.toList());
217217
assertThat(sfCalls).containsExactly(1, 1, 2, 2, 3, 3, 1, 1, 2, 2, 3, 3, 1, 2, 3, 1, 2);

0 commit comments

Comments
 (0)