Skip to content
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

merge #48

Merged
merged 16 commits into from
Jul 16, 2021
Merged

merge #48

merged 16 commits into from
Jul 16, 2021

Conversation

M-Wicenec
Copy link
Collaborator

No description provided.

M-Wicenec and others added 16 commits July 9, 2021 18:30
In FileDROP's setCompleted call we update the _size attribute by issuing
an os.stat call. This call can fail when the file is not present, which
in turn happens when none of its producers actually wrote anything into
it. Depending on the context, the error will be visible or not (e.g., it
might not appear in the logfiles if the call was issued on a thread with
no high-level try/catch+log block -- like those spawned by
AppDrop.execute).

This commit fixes this by catching errors from the os.stat call.
Additionally when the file has not been created we create it; this way
we prevent consuming applications to fail reading from a non-existing
file.

A unit test has been included to reproduce this setup in a simple way.

This problem was reported in LIU-111.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
FileDROP.setCompleted is almost a verbatim copy of Drop.setCompleted,
but it was missing the new additions from the new SKIPPED state. At some
point we should look into merging these two implementations to avoid
code duplication.

Together with this fix, I've modified the existing branch tests to
ensure branches work with FileDROPs as well.

Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
@M-Wicenec M-Wicenec merged commit f827712 into liu-121 Jul 16, 2021
@coveralls
Copy link

coveralls commented Jul 16, 2021

Coverage Status

Coverage increased (+0.02%) to 77.304% when pulling 0fe5a49 on master into fc6747d on liu-121.

awicenec pushed a commit that referenced this pull request May 19, 2022
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.

None yet

4 participants