RBTools Ticket #4916: Execute the test case parse_revision_spec to report an error

5 views
Skip to first unread message

simon28li simon28li

unread,
Feb 26, 2021, 1:15:44 AM2/26/21
to simon28li simon28li, reviewboa...@googlegroups.com
To reply, visit https://hellosplat.com/s/beanbag/tickets/4916/

New ticket #4916 by simon28li

For Beanbag, Inc. RBTools

Execute the test case parse_revision_spec to report an error

What version are you running?

2.0

What steps will reproduce the problem?

  1. python ./tests/runtests.py

What is the expected output? What do you see instead?

Expect to execute test cases without failure

What operating system are you using?

CentOS 8.0 kernel:4.18.0-193.el8.aarch64

Error report

======================================================================
ERROR: Testing SVNClient.parse_revision_spec with one revision and a repository URL
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/root/spack-stage/spack-stage-py-rbtools-2.0-t7oemjhzkyi63h6vgaspg34itm4325k6/spack-src/rbtools/clients/tests/test_svn.py", line 364, in test_parse_revision_spec_one_revision_url
    revisions = self.client.parse_revision_spec(['1549823'])
  File "/tmp/root/spack-stage/spack-stage-py-rbtools-2.0-t7oemjhzkyi63h6vgaspg34itm4325k6/spack-src/rbtools/clients/svn.py", line 237, in parse_revision_spec
    raise InvalidRevisionSpecError(
rbtools.clients.errors.InvalidRevisionSpecError: "1549823" does not appear to be a valid revision or changelist name
-------------------- >> begin captured logging << --------------------
root: DEBUG: Running: svn co file:///tmp/root/spack-stage/spack-stage-py-rbtools-2.0-t7oemjhzkyi63h6vgaspg34itm4325k6/spack-src/rbtools/clients/tests/testdata/svn-repo svn-repo
root: DEBUG: Running: svn --non-interactive log --xml -r 1549823 -l 1 http://svn.apache.org/repos/asf/subversion/trunk
root: DEBUG: Command exited with rc 1: ['svn', '--non-interactive', 'log', '--xml', '-r', '1549823', '-l', '1', 'http://svn.apache.org/repos/asf/subversion/trunk']
b'<?xml version="1.0" encoding="UTF-8"?>\n<log>\n'---
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Testing SVNClient.parse_revision_spec with R1:R2 syntax and a repository URL
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/root/spack-stage/spack-stage-py-rbtools-2.0-t7oemjhzkyi63h6vgaspg34itm4325k6/spack-src/rbtools/clients/tests/test_svn.py", line 378, in test_parse_revision_spec_two_revisions_url
    revisions = self.client.parse_revision_spec(['1549823:1550211'])
  File "/tmp/root/spack-stage/spack-stage-py-rbtools-2.0-t7oemjhzkyi63h6vgaspg34itm4325k6/spack-src/rbtools/clients/svn.py", line 248, in parse_revision_spec
    raise InvalidRevisionSpecError(
rbtools.clients.errors.InvalidRevisionSpecError: Could not parse specified revisions: ['1549823', '1550211']
-------------------- >> begin captured logging << --------------------
root: DEBUG: Running: svn co file:///tmp/root/spack-stage/spack-stage-py-rbtools-2.0-t7oemjhzkyi63h6vgaspg34itm4325k6/spack-src/rbtools/clients/tests/testdata/svn-repo svn-repo
root: DEBUG: Running: svn --non-interactive log --xml -r 1549823 -l 1 http://svn.apache.org/repos/asf/subversion/trunk
root: DEBUG: Command exited with rc 1: ['svn', '--non-interactive', 'log', '--xml', '-r', '1549823', '-l', '1', 'http://svn.apache.org/repos/asf/subversion/trunk']
b'<?xml version="1.0" encoding="UTF-8"?>\n<log>\n'---
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 263 tests in 288.461s

FAILED (SKIP=64, errors=2)

Please provide any additional information below.

Can you give me some help?

New Priority:Medium Type:Defect

David Trowbridge

unread,
Feb 26, 2021, 1:11:30 PM2/26/21
to David Trowbridge, simon28li simon28li, reviewboa...@googlegroups.com

New update by david

For Beanbag, Inc. RBTools Ticket #4916

Perhaps you could add some logging to SVNClient's convert_symbolic_revision method to have it print the full output from that XML? That way we might see what's going on.

Status:
- New
+ NeedInfo

simon28li simon28li

unread,
Mar 1, 2021, 3:47:06 AM3/1/21
to simon28li simon28li, reviewboa...@googlegroups.com

New update by simon28li

command = ['log', '--xml'] + svn_args rc, result, errors = self._run_svn(command, args, return_error_code=True, with_errors=False, return_errors=True, ignore_errors=True, results_unicode=False, *kwargs) print(rc,result,errors) 1 b'<?xml version="1.0" encoding="UTF-8"?>\n<log>\n' b"svn: E170013: Unable to connect to a repository at URL 'http://svn.apache.org/repos/asf/subversion/trunk'\nsvn: E000110: Error running context: Connection timed out\n" Looks like I linked to the remote warehouse timed out? But I seem to have no problem performing the svn connection manually.

[root@localhost spack-src]# svn --non-interactive log --xml -r 1549823 -l 1 http://svn.apache.org/repos/asf/subversion/trunk <?xml version="1.0" encoding="UTF-8"?> <log> <logentry revision="1549823"> <author>rhuijben</author> <date>2013-12-10T11:57:35.282910Z</date> <msg>Move a few test helper functions to a library to avoid having to import tests from other tests.

  • cmdline/relocate_tests.py Import from deeptrees instead of switch_tests.

  • cmdline/svntest/deeptrees.py (get_routine_status_state, get_routine_disk_state, do_routine_switching, commit_routine_switching): Move functions here...

  • cmdline/switch_tests.py (get_routine_status_state, get_routine_disk_state, do_routine_switching, commit_routine_switching): that used to be here here.

Update imports. </msg> </logentry> </log>

Reply all
Reply to author
Forward
0 new messages