File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616VCR . configure do |config |
1717 config . cassette_library_dir = "test/fixtures/vcr_cassettes"
1818 config . hook_into :webmock
19- # this is used in initial connection spec
20- config . before_playback ( :tag_recorded ) { $already_recorded = true }
2119end
Original file line number Diff line number Diff line change 1010 # Simulate some "before all" type of setup
1111 # https://github.com/seattlerb/minitest/issues/61#issuecomment-4581115
1212 def self . zen
13- $already_recorded = false
1413 VCR . use_cassette ( 'initial connection' , :tag => :tag_recorded ) do
1514 @zen ||= begin
1615 connection = Zenoss . connect ZENOSS_URL , ZENOSS_USER , ZENOSS_PASSWORD
@@ -40,7 +39,7 @@ def self.zen
4039 if devs . empty?
4140 retries -= 1
4241 LOG . info ( "#{ TEST_DEVICE_NAME } not available yet" )
43- sleep ( retry_delay ) unless $already_recorded
42+ sleep ( retry_delay ) if VCR . current_cassette . recording?
4443 else
4544 found_device = true
4645 LOG . info ( "#{ TEST_DEVICE_NAME } is available. Proceeding with " \
You can’t perform that action at this time.
0 commit comments