From e640fbb58d4c6ad05f650b459fa5dd70ae5cfa15 Mon Sep 17 00:00:00 2001 From: ilslv <47687266+ilslv@users.noreply.github.com> Date: Fri, 29 Oct 2021 11:33:30 +0300 Subject: [PATCH] Get `Serial` `Scenario`s from the front of the queue in `runner::Basic` (#146) --- CHANGELOG.md | 14 ++++++++++++++ src/runner/basic.rs | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index afb0d757..4179e985 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,20 @@ All user visible changes to `cucumber` crate will be documented in this file. Th +## [0.10.1] · 2021-10-?? +[0.10.1]: /../../tree/v0.10.1 + +[Diff](/../../compare/v0.10.0...v0.10.1) | [Milestone](/../../milestone/4) + +### Fixed + +- Console output hanging because of executing wrong `Concurrent` `Scenario`s. ([#146]) + +[#146]: /../../pull/146 + + + + ## [0.10.0] · 2021-10-26 [0.10.0]: /../../tree/v0.10.0 diff --git a/src/runner/basic.rs b/src/runner/basic.rs index 4fdefee2..bc9f4352 100644 --- a/src/runner/basic.rs +++ b/src/runner/basic.rs @@ -1217,7 +1217,7 @@ impl Features { let mut scenarios = self.scenarios.lock().await; scenarios .get_mut(&ScenarioType::Serial) - .and_then(|s| s.pop().map(|s| vec![s])) + .and_then(|s| (!s.is_empty()).then(|| vec![s.remove(0)])) .or_else(|| { scenarios.get_mut(&ScenarioType::Concurrent).and_then(|s| { (!s.is_empty()).then(|| {