Skip to content

Commit

Permalink
fix: CreateArtifact: Received non-retryable error: Failed request: (4…
Browse files Browse the repository at this point in the history
…09) Conflict: an artifact with this name already exists on the workflow run
  • Loading branch information
route committed Feb 18, 2024
1 parent dbe79f2 commit ef47a1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ def save_exception_artifacts(browser, meta)
end

def save_exception_screenshot(browser, filename, line_number, timestamp)
screenshot_name = "screenshot-#{filename}-#{line_number}-#{timestamp}.png"
screenshot_name = "screenshot-#{filename}-#{line_number}-#{timestamp}-#{rand(1000)}.png"
screenshot_path = "/tmp/cuprite/#{screenshot_name}"
browser.screenshot(path: screenshot_path, full: true)
rescue StandardError => e
puts "#{e.class}: #{e.message}"
end

def save_exception_log(browser, filename, line_number, timestamp)
log_name = "logfile-#{filename}-#{line_number}-#{timestamp}.txt"
log_name = "logfile-#{filename}-#{line_number}-#{timestamp}-#{rand(1000)}.txt"
File.binwrite("/tmp/cuprite/#{log_name}", browser.options.logger.string)
rescue StandardError => e
puts "#{e.class}: #{e.message}"
Expand Down

0 comments on commit ef47a1d

Please sign in to comment.