Claus Ibsen created CAMEL-24189:
-----------------------------------
Summary: camel-smb - SmbStreamDownloadIT fails with empty body on
streamDownload
Key: CAMEL-24189
URL: https://issues.apache.org/jira/browse/CAMEL-24189
Project: Camel
Issue Type: Bug
Components: camel-smb
Reporter: Claus Ibsen
The {{SmbStreamDownloadIT.testStreamDownload}} test fails consistently on main
with:
{code}
expected: <World\n> but was: <>
{code}
When {{streamDownload=true}}, the consumer wraps the SMB file handle in a
{{SmbFileClosingInputStream}} and sets it as the exchange body. However, by the
time the test reads the {{InputStream}} from the exchange, the stream returns
empty content.
This is a stream lifecycle / timing issue: the underlying SMB file handle is
being closed or the stream consumed before the test (or a downstream processor)
can read it.
Note: this is *not* the same class of bug as CAMEL-24088 (FTP streamDownload).
The FTP issue was about unchecked null returns and ignored completion status.
The SMB code correctly throws {{SMBRuntimeException}} on open failures. The SMB
problem is that the stream content is lost between the consumer setting the
body and the downstream processor reading it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)