Skip to content

RPA takes a lot more time to close the test suite after the reports, log are generated. #1221

@rakaboy-s

Description

@rakaboy-s

Once the tests are complete and the output, report, and log files are generated, the test suite still does not end immediately.
I have a simple test suite with 10 test cases. If I run a single test case, it takes an additional 20 seconds after the output is generated. The output files are as follows:

Output:  C:\Git\rtf\Test_Suite_D\output\output.xml  
Log:     C:\Git\rtf\Test_Suite_D\output\log.html  
Report:  C:\Git\rtf\Test_Suite_D\output\report.html

If I run all the test cases, it takes about 200 seconds after the output is generated. The more test cases there are, the longer this delay becomes.

Its getting difficult to run more test cases. I have observed that this issue is from rpaframework version 20 afterwards

If I cancel it after 100 seconds using ctrl+c then it gives

Exception ignored in atexit callback: <function Selenium._close_on_exit.<locals>.stop_drivers at 0x00000265A5918400>
Traceback (most recent call last):
  File "C:\Git\rtf\Test_Suite_D\.venv\Lib\site-packages\RPA\Browser\Selenium.py", line 294, in stop_drivers
    self._quit_all_drivers()
  File "C:\Git\rtf\Test_Suite_D\.venv\Lib\site-packages\RPA\Browser\Selenium.py", line 313, in _quit_all_drivers
    driver.quit()  # quits the browser as well
    ^^^^^^^^^^^^^
  File "C:\Git\rtf\Test_Suite_D\.venv\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 192, in quit
    self.service.stop()
  File "C:\Git\rtf\Test_Suite_D\.venv\Lib\site-packages\selenium\webdriver\common\service.py", line 146, in stop
    self.send_remote_shutdown_command()
  File "C:\Git\rtf\Test_Suite_D\.venv\Lib\site-packages\selenium\webdriver\common\service.py", line 126, in send_remote_shutdown_command
    request.urlopen(f"{self.service_url}/shutdown")
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 519, in open
    response = self._open(req, data)
               ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 1377, in http_open
    return self.do_open(http.client.HTTPConnection, req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\urllib\request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1298, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1344, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1293, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 1052, in _send_output
    self.send(msg)
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 990, in send
    self.connect()
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\http\client.py", line 956, in connect
    self.sock = self._create_connection(
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python311\Lib\socket.py", line 843, in create_connection
    exceptions.clear()  # raise only the last error
    ^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions