Skip to content

Refactor/deprivilege #353

Refactor/deprivilege

Refactor/deprivilege #353

GitHub Actions / test/extension/* failed Aug 6, 2024 in 1s

0 passed, 2 failed and 0 skipped

Tests failed

❌ junit-report.xml

2 tests were completed in 935s with 0 passed, 2 failed and 0 skipped.

Test suite Passed Failed Skipped Time
pytest 2❌ 935s

❌ pytest

test.extension.test_logging
  ❌ test_extension_logging
	task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f0bf06f2980>
test.extension.test_startup_timeout
  ❌ test_extension_startup_timeout
	task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f0bf05b4fe0>

Annotations

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/extension/*

pytest ► test.extension.test_logging ► test_extension_logging

Failed test found in:
  junit-report.xml
Error:
  task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f0bf06f2980>
Raw output
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f0bf06f2980>
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_extension_logging0'), log_path=PosixPath(...e to webpack name mangling\n            loggingDB.logWarn("This is a test message from the extension"); \n        '})])
tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-0/test_extension_logging0')

    def test_extension_logging(task_manager_creator, default_params, tmp_path):
        test_msg = "This is a test message from the extension"
        log_path = tmp_path / "openwpm.log"
        manager_params, browser_params = default_params
        manager_params.log_path = log_path
        for browser_param in browser_params:
            browser_param.custom_params[
                "pre_instrumentation_code"
            ] = f"""
                // Weird name needed due to webpack name mangling
                loggingDB.logWarn("{test_msg}");
            """
    
>       task_manager, _ = task_manager_creator((manager_params, browser_params))

/home/runner/work/OpenWPM/OpenWPM/test/extension/test_logging.py:14: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:149: in __init__
    self.storage_controller_handle.save_configuration(
/home/runner/work/OpenWPM/OpenWPM/openwpm/storage/storage_controller.py:472: in save_configuration
    sock = DataSocket(self.listener_address, "StorageControllerHandle")
/home/runner/work/OpenWPM/OpenWPM/openwpm/storage/storage_controller.py:389: in __init__
    self.socket.connect(*listener_address)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <openwpm.socket_interface.ClientSocket object at 0x7f0bf0587850>
host = '127.0.0.1', port = 37871

    def connect(self, host, port):
        if self.verbose:
            print("Connecting to: %s:%i" % (host, port))
>       self.sock.connect((host, port))
E       ConnectionRefusedError: [Errno 111] Connection refused

/home/runner/work/OpenWPM/OpenWPM/openwpm/socket_interface.py:127: ConnectionRefusedError

Check failure on line 0 in junit-report.xml

See this annotation in the file changed.

@github-actions github-actions / test/extension/*

pytest ► test.extension.test_startup_timeout ► test_extension_startup_timeout

Failed test found in:
  junit-report.xml
Error:
  task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f0bf05b4fe0>
Raw output
task_manager_creator = <function task_manager_creator.<locals>._create_task_manager at 0x7f0bf05b4fe0>
default_params = (ManagerParams(data_directory=PosixPath('/tmp/pytest-of-runner/pytest-0/test_extension_startup_timeout0'), log_path=Po... - startTime < 20000) { // Delaying for 20s\n            console.log("delaying startup");\n           };\n        '})])

    def test_extension_startup_timeout(task_manager_creator, default_params):
        manager_params, browser_params = default_params
        manager_params.num_browsers = 1
        for browser_param in browser_params:
            browser_param.custom_params[
                "pre_instrumentation_code"
            ] = """
               const startTime = Date.now();
               while (Date.now() - startTime < 20000) { // Delaying for 20s
                console.log("delaying startup");
               };
            """
        with pytest.raises(BrowserConfigError) as error:
>           tm, _ = task_manager_creator((manager_params, browser_params[:1]))

/home/runner/work/OpenWPM/OpenWPM/test/extension/test_startup_timeout.py:19: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/home/runner/work/OpenWPM/OpenWPM/test/conftest.py:80: in _create_task_manager
    manager = TaskManager(
/home/runner/work/OpenWPM/OpenWPM/openwpm/task_manager.py:149: in __init__
    self.storage_controller_handle.save_configuration(
/home/runner/work/OpenWPM/OpenWPM/openwpm/storage/storage_controller.py:472: in save_configuration
    sock = DataSocket(self.listener_address, "StorageControllerHandle")
/home/runner/work/OpenWPM/OpenWPM/openwpm/storage/storage_controller.py:389: in __init__
    self.socket.connect(*listener_address)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <openwpm.socket_interface.ClientSocket object at 0x7f0bf05b0e90>
host = '127.0.0.1', port = 36003

    def connect(self, host, port):
        if self.verbose:
            print("Connecting to: %s:%i" % (host, port))
>       self.sock.connect((host, port))
E       ConnectionRefusedError: [Errno 111] Connection refused

/home/runner/work/OpenWPM/OpenWPM/openwpm/socket_interface.py:127: ConnectionRefusedError