From 180c50ec9f2ede6c1367b0cab7eed88ae0132c76 Mon Sep 17 00:00:00 2001 From: Artem Bilan Date: Mon, 17 Mar 2025 10:46:30 -0400 Subject: [PATCH] Fix race condition in the `SftpSessionFactoryTests` Related to: https://github.com/apache/mina-sshd/issues/700 --- .../integration/sftp/session/SftpSessionFactoryTests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/session/SftpSessionFactoryTests.java b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/session/SftpSessionFactoryTests.java index 05d245df5b..807464e07e 100644 --- a/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/session/SftpSessionFactoryTests.java +++ b/spring-integration-sftp/src/test/java/org/springframework/integration/sftp/session/SftpSessionFactoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2024 the original author or authors. + * Copyright 2014-2025 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. @@ -262,7 +262,8 @@ public class SftpSessionFactoryTests { session.close(); assertThat(session.isOpen()).isFalse(); - assertThat(clientSession.isClosed()).isTrue(); + // TODO until https://github.com/apache/mina-sshd/issues/700 + await().untilAsserted(() -> assertThat(clientSession.isClosed()).isTrue()); sftpSessionFactory.destroy(); }