Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#7250 closed defect (fixed)

skip test if consensus file not found

Reported by: gsathya Owned by: atagar
Priority: Low Milestone:
Component: Core Tor/Stem Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

This isn't a "failed" test per se, maybe stem should skip it?

======================================================================
                 test.integ.descriptor.networkstatus                  
======================================================================

test_cached_consensus                                        [SUCCESS]
test_cached_microdesc_consensus                              [FAILURE]
test_consensus_v2                                            [SUCCESS]
test_consensus_v3                                            [SUCCESS]
test_metrics_consensus                                       [SUCCESS]
test_metrics_vote                                            [SUCCESS]
test_vote                                                    [SUCCESS]

======================================================================
ERROR: test_cached_microdesc_consensus
----------------------------------------------------------------------
Traceback:
  File "/home/gsathya/stem/test/integ/descriptor/networkstatus.py", line 76, in test_cached_microdesc_consensus
    with open(consensus_path) as descriptor_file:
IOError: [Errno 2] No such file or directory: '/home/gsathya/stem/test/data/cached-microdesc-consensus'

----------------------------------------------------------------------
Ran 7 tests in 0.142s

FAILED

Child Tickets

Change History (2)

comment:1 follow-up: Changed 5 years ago by atagar

  • Resolution set to fixed
  • Status changed from new to closed

It already tries...

if not os.path.exists(consensus_path):
  test.runner.skip(self, "(no cached-microdesc-consensus)")
elif stem.util.system.is_windows():
  test.runner.skip(self, "(unavailable on windows)")
  return

https://gitweb.torproject.org/stem.git/blob/HEAD:/test/integ/descriptor/networkstatus.py#l59

The trouble is that we're not returning after we call skip(), which causes us to still fail on python 2.5 and 2.6.

Fixed...
https://gitweb.torproject.org/stem.git/commitdiff/89ec87cfa3c119d96ee32d7debec0dde9e97cb51

Anything that I can do to persuade you to not only report issues but also patches? ;)

comment:2 in reply to: ↑ 1 Changed 5 years ago by gsathya

Replying to atagar:

Anything that I can do to persuade you to not only report issues but also patches? ;)

Heh, will do next time :)

Note: See TracTickets for help on using tickets.