From 7be5353c31be361a2a73b93b83f8e4dffacd8c1b Mon Sep 17 00:00:00 2001 From: vveliev Date: Thu, 18 Jul 2019 04:09:06 -0400 Subject: [PATCH] fixing issue with formatter when file with launch id is provided --- lib/report_portal/cucumber/report.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/report_portal/cucumber/report.rb b/lib/report_portal/cucumber/report.rb index 88b9cc3..5a3f9ff 100644 --- a/lib/report_portal/cucumber/report.rb +++ b/lib/report_portal/cucumber/report.rb @@ -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