Page MenuHomePhabricator

skip subtest test_work_queue_exceeded in interface_rpc.py when CLI is not compiled
ClosedPublic

Authored by PiRK on Feb 28 2023, 20:00.

Details

Summary

This test relies on sending an excessive number of RPC calls via the command line (node.cli('getrpcinfo').send_cli())). I tried sending the RPC calls with node.getrpcinfo() but that does not seem to work, the test keeps running forever.

I could not find a rationale in the original PR for why the CLI is used, but my testing seems to indicate that there is a good reason.

This unbreaks the build-without-cli CI build.

Test Plan

ninja check-functional

@bot build-without-cli

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix_cli
Lint
Lint Warnings
SeverityLocationCodeMessage
Warningtest/functional/interface_rpc.py:96W291flake8 W291
Unit
No Test Coverage
Build Status
Buildable 22150
Build 43935: Build Diffbuild-debug · build-clang-tidy · build-diff · build-clang · build-without-wallet
Build 43934: arc lint + arc unit

Event Timeline

PiRK requested review of this revision.Feb 28 2023, 20:00

Failed tests logs:

====== Bitcoin ABC functional tests: interface_rpc.py ======

------- Stdout: -------
2023-02-28T20:09:19.568000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-cli/test/tmp/test_runner_₿₵_  _20230228_200507/interface_rpc_213
2023-02-28T20:09:19.864000Z TestFramework (INFO): Testing getrpcinfo...
2023-02-28T20:09:19.864000Z TestFramework (INFO): Testing basic JSON-RPC batch request...
2023-02-28T20:09:19.865000Z TestFramework (INFO): Testing HTTP status codes for JSON-RPC requests...
2023-02-28T20:09:19.866000Z TestFramework (INFO): Skipping test_work_queue_exceeded (CLI not compiled)
2023-02-28T20:09:19.866000Z TestFramework (INFO): Testing work queue exceeded...
2023-02-28T20:09:20.318000Z TestFramework (INFO): Stopping nodes
2023-02-28T20:09:20.423000Z TestFramework (INFO): Cleaning up /work/abc-ci-builds/build-without-cli/test/tmp/test_runner_₿₵_  _20230228_200507/interface_rpc_213 on exit
2023-02-28T20:09:20.423000Z TestFramework (INFO): Tests successful
------- Stderr: -------
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
Exception in thread Thread-3:
    self.run()
Traceback (most recent call last):
  File "/work/test/functional/interface_rpc.py", line 30, in test_work_queue_getblock
  File "/usr/lib/python3.9/threading.py", line 892, in run
  File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    node.cli('getrpcinfo').send_cli()
  File "/work/test/functional/test_framework/test_node.py", line 922, in send_cli
    self._target(*self._args, **self._kwargs)
    self.run()
  File "/work/test/functional/interface_rpc.py", line 30, in test_work_queue_getblock
  File "/usr/lib/python3.9/threading.py", line 892, in run
    process = subprocess.Popen(p_args, stdin=subprocess.PIPE,
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    node.cli('getrpcinfo').send_cli()
  File "/work/test/functional/test_framework/test_node.py", line 922, in send_cli
    self._target(*self._args, **self._kwargs)
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/work/test/functional/interface_rpc.py", line 30, in test_work_queue_getblock
  File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
    process = subprocess.Popen(p_args, stdin=subprocess.PIPE,
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    node.cli('getrpcinfo').send_cli()
  File "/work/test/functional/test_framework/test_node.py", line 922, in send_cli
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/work/abc-ci-builds/build-without-cli/src/bitcoin-cli'
    process = subprocess.Popen(p_args, stdin=subprocess.PIPE,
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/work/abc-ci-builds/build-without-cli/src/bitcoin-cli'
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/work/abc-ci-builds/build-without-cli/src/bitcoin-cli'

Each failure log is accessible here:
Bitcoin ABC functional tests: interface_rpc.py

test/functional/interface_rpc.py
96

I let the linter autofix the error when I did arc diff. I guess this is flake_ & autopep8 double flagging of the issue.

This revision is now accepted and ready to land.Mar 1 2023, 09:02