[GODRIVER-420] integration tests should detect topology from connection, not TOPOLOGY envvar Created: 22/May/18 Updated: 28/Oct/23 Resolved: 03/Sep/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Testing |
| Affects Version/s: | 0.0.6 |
| Fix Version/s: | 1.2.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Sam Kleinman (Inactive) | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Epic Link: | Robust Testing Framework | ||||||||
| Description |
|
My local mongodb test environment, which the driver to run tests normally via go tests, fails the Change Stream tests, because I have a replica set running locally, but the test fixtures assume that since the TOPOLOGY envvar isn't set, that it's a standalone. For some tests its reasonable to rely on the topology argument, but this one is awkward, as it means that my local system always fails. |
| Comments |
| Comment by Divjot Arora (Inactive) [ 03/Sep/19 ] |
|
The testing framework implemented in |
| Comment by Githook User [ 03/Sep/19 ] |
|
Author: {'username': 'divjotarora', 'email': 'divjot.arora@10gen.com', 'name': 'Divjot Arora'}Message: Implement a testing framework.
Change-Id: I314b81e5474feda0457965a869f90989b32ec0ca |
| Comment by Kristofer Brandow (Inactive) [ 22/May/18 ] |
|
Another reason to use command line flags and not intuit the topology is that command line flags will prevent caching of test results, which we probably don't want to cache because it means if we switch topologies that tests won't be rerun. |
| Comment by Kristofer Brandow (Inactive) [ 22/May/18 ] |
|
The test that's failing here is because the TOPOLOGY envvar isn't set to the replica_set the tests think it's talking to a standalone and that getting a change stream should fail, but it doesn't, which is why the test fails. We need a better test framework, and I would much rather have mandatory command line flags then try and have some tests intuit what type of topology they are communicating with. |
| Comment by Jeffrey Yemin [ 22/May/18 ] |
|
Shouldn't the test runner skip the test rather than fail it in this scenario? I recently implemented auto-cluster-type-detection in the Java driver's test runner, and that has been saving me a lot of time especially when working on features that require a replica set. See |