Skip to content

Attempt to fix flakyness of path traversal test#2387

Merged
pcapriotti merged 1 commit intodevelopfrom
pcapriotti/flaky-path-traversal
May 13, 2022
Merged

Attempt to fix flakyness of path traversal test#2387
pcapriotti merged 1 commit intodevelopfrom
pcapriotti/flaky-path-traversal

Conversation

@pcapriotti
Copy link
Contributor

Instead of generating String values, which might be invalid for the file system encoding in some locales, generate bytestrings directy and encode them as paths.

I hope this fixes a flakyness in the path traversal tests reported by @jschaul.

Checklist

  • The PR Title explains the impact of the change.
  • The PR description provides context as to why the change should occur and what the code contributes to that effect. This could also be a link to a JIRA ticket or a Github issue, if there is one.
  • changelog.d contains the following bits of information (details):
    • A file with the changelog entry in one or more suitable sub-sections. The sub-sections are marked by directories inside changelog.d.

Instead of generating `String` values, which might be invalid for the
file system encoding in some locales, generate bytestrings directy and
encode them as paths.
@pcapriotti pcapriotti requested a review from jschaul May 11, 2022 17:02
@pcapriotti pcapriotti temporarily deployed to cachix May 11, 2022 17:04 Inactive
Copy link
Member

@jschaul jschaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have problems myself reproducing this, as it doesn't always happen, and annoyingly I am unable to get the tests to fail when only running the tests in question.

Both outputs below are from develop, not this branch: The top pane is output from running make (without further arguments), which eventually runs all tests including the federator ones. This sometimes exhibits the problem, and sometimes not. The bottom pane is a manual run of the federator tests. I ran the bottom command (with and without the quickcheck seed) 100 times in a loop and it never failed. I'm not sure if there's something that increases the likelihood for this to fail when I run all unit tests instead of just the federator ones.

traversal

But I ran make a few times on this branch, and I still get some failures in other packages (hscim, types-common) sometimes; but not in federator anymore. So this change seems to be useful.

I'll post the offending remaining sometimes-failing tests elsewhere to be addressed in another PR.

@jschaul
Copy link
Member

jschaul commented May 12, 2022

@pcapriotti pcapriotti merged commit 450df4e into develop May 13, 2022
@pcapriotti pcapriotti deleted the pcapriotti/flaky-path-traversal branch May 13, 2022 07:56
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.

3 participants

Comments