Skip to content

Commit

Permalink
fixing issue with formatter when file with launch id is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
vveliev-tc committed Jul 18, 2019
1 parent 2c447d8 commit 7be5353
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/report_portal/cucumber/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ def initialize(logger)
end

def start_launch(desired_time, cmd_args = ARGV)
# Expected behavior that make sense:
# 1. If launch_id present attach to existing (simple use case)
# 2. If launch_id not present check if exist rp_launch_id.tmp
# 3. [ADDED] If launch_id is not present check if lock exist with launch_uuid
if attach_to_launch?
ReportPortal.launch_id =
if ReportPortal::Settings.instance.launch_id
ReportPortal::Settings.instance.launch_id
else
self.started_launch = true
file_path = lock_file
File.file?(file_path) ? read_lock_file(file_path) : new_launch(desired_time, cmd_args, file_path)
if File.file?(file_path)
read_lock_file(file_path)
else
self.started_launch = true
new_launch(desired_time, cmd_args, file_path)
end
end
@logger.info "Attaching to launch #{ReportPortal.launch_id}"
else
Expand Down

0 comments on commit 7be5353

Please sign in to comment.