-
Notifications
You must be signed in to change notification settings - Fork 80
Solve stochastic failure #1046
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
Solve stochastic failure #1046
Conversation
ping @biocore/qiita-dev |
👍 |
@@ -561,7 +561,7 @@ def _add_common_creation_steps_to_queue(cls, md_template, obj_id, | |||
values, many=True) | |||
|
|||
# Insert rows on *_columns table | |||
headers = list(set(headers).difference(db_cols)) | |||
headers = sorted(list(set(headers).difference(db_cols))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor, but the cast to a list is not needed here:
>>> x = {1, 1, 1, 1, 1, 3, 5555, 4, 5}
>>> sorted(x)
[1, 3, 4, 5, 5555]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not know that! Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
On (Apr-08-15|10:07), josenavas wrote:
@@ -561,7 +561,7 @@ def _add_common_creation_steps_to_queue(cls, md_template, obj_id,
values, many=True)# Insert rows on *_columns table
headers = list(set(headers).difference(db_cols))
headers = sorted(list(set(headers).difference(db_cols)))
I did not know that! Thanks!
Reply to this email directly or view it on GitHub:
https://github.com/biocore/qiita/pull/1046/files#r27990502
👍 just one minor comment. |
I found a potential stochastic failure in the metadata template tests. It is solved by enforcing some sorting on the way the columns are inserted in the database, so it is easy testable.
I would appreciate a fast review on this one as it can potentially impact any future PR.