-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-2318 Atlas Data Lake testing #500
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
PYTHON-2318 Atlas Data Lake testing #500
Conversation
Test failures are because the data lake tests are getting run even when we are not connected to data lake. I will implement a |
self.client = self._connect( | ||
host, port, username=db_user, password=db_pwd) | ||
self.connected = True | ||
return |
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 seems like something that should run after _init_client()
returns. Is there a reason it is placed here?
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.
_init_client()
relies on DB commands like getCmdLineOpts
that are not supported by the mongohoused
binary.
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.
Can you add a comment about that? And how does this work if mongohoused is configured with tls? Do we not test tls?
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.
We don't test TLS. Added the comment.
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.
Many of the data lake tests are still failing: https://evergreen.mongodb.com/task/mongo_python_driver_data_lake_spec_tests__platform~ubuntu_16.04_auth~auth_python_version~3.8_c_extensions~with_c_extensions_atlas_data_lake_tests_patch_337a08c43d832c6838f07a46d6fac8ebbdacb2b6_5f7f68e8d6d80a5a59f3d373_20_10_08_19_30_49
test/test_data_lake.py
Outdated
|
||
|
||
test_creator = TestCreator( | ||
create_test, DataLakeTestSpec, _TEST_PATH).create_tests() |
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.
Nit: let's remove test_creator =
:
TestCreator(create_test, DataLakeTestSpec, _TEST_PATH).create_tests()
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.
Removed here and in test_crud_v2
.
test/test_data_lake.py
Outdated
def maybe_skip_scenario(self, test): | ||
# Skip these tests unless connected to data lake. | ||
if not client_context.is_data_lake: | ||
self.skipTest('Not connected to Atlas Data Lake') |
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 would be more appropriate at the setUpClass
level that way we don't need to see every skipped test in the unittest output.
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.
Done.
test/test_data_lake.py
Outdated
|
||
# Default test database and collection names. | ||
TEST_DB = 'test' | ||
TEST_COLLECTION = 'driverdata' |
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.
Are these needed anymore?
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.
The data lake tests confrom to the CRUD v2 format which makes collection and database names optional so I would say, yes, these are needed.
85133b6
to
ab07ce7
Compare
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.
LGTM, the test failures on latest
seem unrelated:
[2020/12/17 07:24:08.038] FAIL: test_monitor_waits_after_server_check_error (test_streaming_protocol.TestStreamingProtocol)
[2020/12/17 07:24:08.038] ----------------------------------------------------------------------
[2020/12/17 07:24:08.038] Traceback (most recent call last):
[2020/12/17 07:24:08.038] File "/data/mci/5bc1cda572017d013fc9df6622120780/src/test/__init__.py", line 458, in wrap
[2020/12/17 07:24:08.038] return f(*args, **kwargs)
[2020/12/17 07:24:08.038] File "/data/mci/5bc1cda572017d013fc9df6622120780/src/test/__init__.py", line 458, in wrap
[2020/12/17 07:24:08.038] return f(*args, **kwargs)
[2020/12/17 07:24:08.038] File "/data/mci/5bc1cda572017d013fc9df6622120780/src/test/test_streaming_protocol.py", line 167, in test_monitor_waits_after_server_check_error
[2020/12/17 07:24:08.038] self.assertGreaterEqual(duration, 2)
[2020/12/17 07:24:08.038] AssertionError: 0.5085382461547852 not greater than or equal to 2
(cherry picked from commit c673d8b)
No description provided.