-
Notifications
You must be signed in to change notification settings - Fork 326
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
Fix sporadic Table_Tests
failures caused by reliance on test ordering.
#9438
Conversation
I see. So the |
@@ -539,7 +539,7 @@ add_specs suite_builder setup = | |||
t2.should_fail_with Ambiguous_Column_Rename | |||
err = t2.catch | |||
err.column_name . should_equal "beta" | |||
err.new_names . should_equal ["FirstColumn", "DifferentName!"] | |||
err.new_names.sort . should_equal ["DifferentName!", "FirstColumn"] |
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.
This test probably relied on Map
iteration order. (It failed when I changed the iteration order to reproduce the failures.)
@@ -587,7 +587,7 @@ add_specs suite_builder setup = | |||
group_builder.specify "should correctly handle problems: duplicate names" <| | |||
map = ["Test", "Test", "Test", "Test"] | |||
action = data.table.rename_columns map on_problems=_ | |||
tester = expect_column_names ["Test 1", "Test 2", "Test 3", "Test"] | |||
tester = expect_column_names ["Test 1", "Test 2", "Test 3", "Test"] ignore_order=True |
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.
This test probably relied on Map
iteration order. (It failed when I changed the iteration order to reproduce the failures.)
@@ -394,6 +394,9 @@ type File_Connection | |||
|
|||
add_specs suite_builder = | |||
in_file_prefix = "[SQLite File] " | |||
# TODO: Add a suite-level teardown to delete this file at the end. |
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.
This file is removed (if it exists) at the start of the test so it's okay if we don't clean it up for now.
@@ -442,7 +442,7 @@ add_specs suite_builder = | |||
group_builder.specify "should connect to a db file" <| | |||
connection = Data.read data.file | |||
tables = connection.tables | |||
tables.row_count . should_not_equal 0 |
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'm assuming here that if this test ever ran first, this line would have failed.
It looks like the test "SQLite_Format should allow connecting to SQLite files" was responsible for cleaning up the SQLite test file, as it removed the file and was last in the test suite. Now that tests run out of order, this won't work.
This PR removes the teardown that was deleting the file early.
#9436 #9437
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.