NIFI-12091 Workaround for TestListenTCPRecord to be corrected in NIFI-12098

This closes #7765

Signed-off-by: David Handermann <exceptionfactory@apache.org>
(cherry picked from commit 4527e3fe0fc8e02f7a579dc9ab7d2e93a356b640)
This commit is contained in:
Joseph Witt 2023-09-20 10:39:34 -07:00 committed by exceptionfactory
parent 237892988a
commit 152332eba4
No known key found for this signature in database
GPG Key ID: 29B6A52D2AAE8DBA

View File

@ -222,7 +222,12 @@ public class TestListenTCPRecord {
final OutputStream outputStream = socket.getOutputStream();
outputStream.write(DATA.getBytes(StandardCharsets.UTF_8));
outputStream.flush();
} catch (final IOException e) {
/**
* Once NIFI-12098 is resolved this sleep can be removed. Without the sleep
* on some systems (Windows builds often) the build can fail and lockup indefinitely.
*/
Thread.sleep(3000);
} catch (final IOException | InterruptedException e) {
LOGGER.error("Failed Sending Records to Port [{}]", port, e);
}
});