Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] tests: do not call methods on None #1249

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

wip

32e1cbf
Select commit
Loading
Failed to load commit list.
Draft

[WIP] tests: do not call methods on None #1249

wip
32e1cbf
Select commit
Loading
Failed to load commit list.
Cirrus CI / Misc functional tests USE_MIN_BITCOIN_VERSION:FALSE failed Nov 18, 2024 in 8m 46s

Task Summary

Instruction test failed in 06:04

Details

⚠️ Not enough compute credits to prioritize tasks!

✅ 00:02 clone
✅ 00:02 cargo_registry
✅ 00:01 cargo_git
✅ 00:03 target
✅ 00:01 tests_tools
✅ 02:17 lianad_build
✅ 00:06 deps
✅ 00:00 pip
✅ 00:03 python_deps
❌ 06:04 test

    @pytest.fixture
    def bitcoind(directory):
        bitcoind = Bitcoind(bitcoin_dir=os.path.join(directory, "bitcoind"))
>       bitcoind.startup()

tests/fixtures.py:109: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_framework/bitcoind.py:272: in startup
    self.start()
tests/test_framework/bitcoind.py:98: in start
    self.wait_for_log("Done loading", timeout=TIMEOUT)
tests/test_framework/utils.py:454: in wait_for_log
    return self.wait_for_logs([regex], timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <test_framework.bitcoind.Bitcoind object at 0x7be7bf045910>
regexs = ['Done loading'], timeout = 120

    def wait_for_logs(self, regexs, timeout=TIMEOUT):
        """Look for `regexs` in the logs.
    
        We tail the stdout of the process and look for each regex in `regexs`,
        starting from last of the previous waited-for log entries (if any).  We
        fail if the timeout is exceeded or if the underlying process
        exits before all the `regexs` were found.
    
        If timeout is None, no time-out is applied.
        """
        logging.debug("Waiting for {} in the logs".format(regexs))
    
        exs = [re.compile(r) for r in regexs]
        start_time = time.time()
        pos = self.logsearch_start
    
        while True:
            if timeout is not None and time.time() > start_time + timeout:
                print("Time-out: can't find {} in logs".format(exs))
                for r in exs:
                    if self.is_in_log(r):
                        print("({} was previously in logs!)".format(r))
>               raise TimeoutError('Unable to find "{}" in logs.'.format(exs))
E               TimeoutError: Unable to find "[re.compile('Done loading')]" in logs.

tests/test_framework/utils.py:430: TimeoutError
---------------------------- Captured stdout setup -----------------------------
Time-out: can't find [re.compile('Done loading')] in logs
------------------------------ Captured log setup ------------------------------
ERROR    root:utils.py:388 TailableProc.tail(): stderr is None!
=========================== short test summary info ============================
ERROR tests/test_misc.py::test_multisig - TimeoutError: Unable to find "[re.compile('Done loading')]" in logs.
ERROR tests/test_misc.py::test_multipath - TimeoutError: Unable to find "[re.compile('Done loading')]" in logs.
ERROR tests/test_misc.py::test_migration - TimeoutError: Unable to find "[re.compile('Done loading')]" in logs.
ERROR tests/test_misc.py::test_coinbase_deposit - TimeoutError: Unable to find "[re.compile('Done loading')]" in logs.
ERROR tests/test_misc.py::test_retry_on_workqueue_exceeded - TimeoutError: Unable to find "[re.compile('Done loading')]" in logs.
ERROR tests/test_misc.py::test_bitcoind_submit_block - TimeoutError: Unable to find "[re.compile('Done loading')]" in logs.
======================== 6 errors in 361.02s (0:06:01) =========================