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

Address perf test UserWarning

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.7
    • Affects Version/s: None
    • Component/s: None
    • None

      perf test is failing with UserWarning: Test timed out, completed 96 iterations.

       [2023/11/03 10:59:18.728] _________________ ERROR at teardown of TestFindOneByID.runTest _________________
       [2023/11/03 10:59:18.728] self = <perf_test.TestFindOneByID testMethod=runTest>
       [2023/11/03 10:59:18.728]     def tearDown(self):
       [2023/11/03 10:59:18.728] >       super().tearDown()
       [2023/11/03 10:59:18.728] test/performance/perf_test.py:215:
       [2023/11/03 10:59:18.728] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2023/11/03 10:59:18.728] test/performance/perf_test.py:87: in tearDown
       [2023/11/03 10:59:18.728]     median = self.percentile(50)
       [2023/11/03 10:59:18.728] test/performance/perf_test.py:116: in percentile
       [2023/11/03 10:59:18.728]     self.fail("Test execution failed")
       [2023/11/03 10:59:18.728] E   AssertionError: Test execution failed
       [2023/11/03 10:59:18.728] _______________ ERROR at teardown of TestJsonMultiExport.runTest _______________
       [2023/11/03 10:59:18.728] self = <perf_test.TestJsonMultiExport testMethod=runTest>
       [2023/11/03 10:59:18.728]     def tearDown(self):
       [2023/11/03 10:59:18.728] >       super().tearDown()
       [2023/11/03 10:59:18.728] test/performance/perf_test.py:487:
       [2023/11/03 10:59:18.728] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2023/11/03 10:59:18.728] test/performance/perf_test.py:87: in tearDown
       [2023/11/03 10:59:18.728]     median = self.percentile(50)
       [2023/11/03 10:59:18.728] test/performance/perf_test.py:116: in percentile
       [2023/11/03 10:59:18.728]     self.fail("Test execution failed")
       [2023/11/03 10:59:18.728] E   AssertionError: Test execution failed
       [2023/11/03 10:59:18.728] =================================== FAILURES ===================================
       [2023/11/03 10:59:18.728] ___________________________ TestFindOneByID.runTest ____________________________
       [2023/11/03 10:59:18.728] self = <perf_test.TestFindOneByID testMethod=runTest>
       [2023/11/03 10:59:18.728]     def runTest(self):
       [2023/11/03 10:59:18.728]         results = []
       [2023/11/03 10:59:18.728]         start = time.monotonic()
       [2023/11/03 10:59:18.728]         self.max_iterations = NUM_ITERATIONS
       [2023/11/03 10:59:18.728]         for i in range(NUM_ITERATIONS):
       [2023/11/03 10:59:18.728]             if time.monotonic() - start > MAX_ITERATION_TIME:
       [2023/11/03 10:59:18.728] >               warnings.warn("Test timed out, completed %s iterations." % i)
       [2023/11/03 10:59:18.728] E               UserWarning: Test timed out, completed 96 iterations.
       [2023/11/03 10:59:18.728] test/performance/perf_test.py:125: UserWarning
       [2023/11/03 10:59:18.728] _________________________ TestJsonMultiExport.runTest __________________________
       [2023/11/03 10:59:18.728] self = <perf_test.TestJsonMultiExport testMethod=runTest>
       [2023/11/03 10:59:18.728]     def runTest(self):
       [2023/11/03 10:59:18.728]         results = []
       [2023/11/03 10:59:18.728]         start = time.monotonic()
       [2023/11/03 10:59:18.728]         self.max_iterations = NUM_ITERATIONS
       [2023/11/03 10:59:18.728]         for i in range(NUM_ITERATIONS):
       [2023/11/03 10:59:18.728]             if time.monotonic() - start > MAX_ITERATION_TIME:
       [2023/11/03 10:59:18.728] >               warnings.warn("Test timed out, completed %s iterations." % i)
       [2023/11/03 10:59:18.728] E               UserWarning: Test timed out, completed 50 iterations.
       [2023/11/03 10:59:18.728] test/performance/perf_test.py:125: UserWarning
       [2023/11/03 10:59:18.728] - generated xml file: /data/mci/24021f5ac23381626be9be524f0ce432/src/xunit-results/TEST-results.xml -
       [2023/11/03 10:59:18.728] ============================= slowest 5 durations ==============================
       [2023/11/03 10:59:18.728] 307.71s call     test/performance/perf_test.py::TestJsonMultiExport::runTest
       [2023/11/03 10:59:18.728] 301.51s call     test/performance/perf_test.py::TestFindOneByID::runTest
       [2023/11/03 10:59:18.728] 249.39s call     test/performance/perf_test.py::TestJsonMultiImport::runTest
       [2023/11/03 10:59:18.728] 248.61s call     test/performance/perf_test.py::TestSmallDocInsertOne::runTest
       [2023/11/03 10:59:18.728] 172.25s call     test/performance/perf_test.py::TestRunCommand::runTest
       [2023/11/03 10:59:18.728] =========================== short test summary info ============================
       [2023/11/03 10:59:18.729] ERROR test/performance/perf_test.py::TestFindOneByID::runTest - AssertionError: Test execution failed
       [2023/11/03 10:59:18.729] ERROR test/performance/perf_test.py::TestJsonMultiExport::runTest - AssertionError: Test execution failed
       [2023/11/03 10:59:18.729] FAILED test/performance/perf_test.py::TestFindOneByID::runTest - UserWarning: Test timed out, completed 96 iterations.
       [2023/11/03 10:59:18.729] FAILED test/performance/perf_test.py::TestJsonMultiExport::runTest - UserWarning: Test timed out, completed 50 iterations.
      

      https://spruce.mongodb.com/task/mongo_python_driver_perf_perf_tests_perf_4.0_standalone_6c88c732194335c8ec8e9c2c6fbd8c81d34151fc_23_11_02_20_13_45/logs?execution=0

      Caused by PYTHON-4014.

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: