-
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
Changes from all commits
1551a21
0a82542
f1a18d4
dfc6cf8
f9ba780
6858e0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"] | ||
|
||
group_builder.specify "should correctly handle edge-cases: aliased selectors" <| | ||
t = table_builder [["alpha", [1,2,3]], ["bet", [4,5,6]]] | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. This test probably relied on |
||
problems = [Duplicate_Output_Column_Names.Error ["Test", "Test", "Test"]] | ||
Problems.test_problem_handling action problems tester | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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. |
||
# https://github.com/enso-org/enso/issues/9436 | ||
# https://github.com/enso-org/enso/issues/9437 | ||
database_file = Database_File.create | ||
|
||
sqlite_spec suite_builder in_file_prefix (_ -> create_file_connection database_file.file) | ||
|
@@ -410,9 +413,6 @@ add_specs suite_builder = | |
suite_builder.group "SQLite_Format should allow connecting to SQLite files" group_builder-> | ||
data = File_Connection.setup database_file | ||
|
||
group_builder.teardown <| | ||
data.teardown | ||
|
||
group_builder.specify "should recognise a SQLite database file" <| | ||
Auto_Detect.get_reading_format data.file . should_be_a SQLite_Format | ||
|
||
|
@@ -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 commentThe 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. |
||
tables.row_count . should_be_a Integer | ||
connection.close | ||
|
||
group_builder.specify 'should not duplicate warnings' <| | ||
|
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.)