Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2762

Unified tests should automatically get run when testing against a load balancer

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.12, 4.0
    • Affects Version/s: None
    • Component/s: None
    • None

      The load balancer spec requires us to run all the unified tests. Currently we accomplish this by explicitly duplicating each unified spec test file in the test/load_balancer/ directory. For example PYTHON-2718 added a new file test/test_command_monitoring_unified.py and therefore we also needed to add a corresponding test/load_balancer/test_command_monitoring_unified.py file.

      This is not ideal because we will easily forget to duplicate new test files in test/load_balancer/. Instead we should make unified tests automatically get run when testing against a load balancer. My idea is to add a "RUN_ON_LB" flag to IntegrationTest which defaults to false. Then the unified test runner can automatically set the flag to true. When testing against a LB we can have IntegrationTest skip any test that does not have the flag. Then we can run all the LB tests just with "python setup.py test".

            shane.harvey@mongodb.com Shane Harvey
            shane.harvey@mongodb.com Shane Harvey
            0 Vote for this issue
            1 Start watching this issue