From 73ec93a287829b61e649d9c0385b6d7b420e6962 Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Tue, 21 Jan 2025 07:55:11 +0100 Subject: [PATCH] fix(launchpad): improve gherkin file for new launchpad (#205) Signed-off-by: Simon Schrottner --- gherkin/connection.feature | 4 ++-- gherkin/events.feature | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gherkin/connection.feature b/gherkin/connection.feature index 340d0fb..7e6a52e 100644 --- a/gherkin/connection.feature +++ b/gherkin/connection.feature @@ -30,7 +30,7 @@ Feature: flagd provider disconnect and reconnect functionality And a ready event handler And a error event handler When a ready event was fired - When the connection is lost for 4s + When the connection is lost for 3s Then the error event handler should have been executed Then the ready event handler should have been executed @@ -55,4 +55,4 @@ Feature: flagd provider disconnect and reconnect functionality Given an option "deadlineMs" of type "Integer" with value "1000" And a unavailable flagd provider And a error event handler - Then the error event handler should have been executed within 2000ms + Then the error event handler should have been executed within 3000ms diff --git a/gherkin/events.feature b/gherkin/events.feature index 3bf86d3..fc052b2 100644 --- a/gherkin/events.feature +++ b/gherkin/events.feature @@ -17,23 +17,33 @@ Feature: Flagd Provider State Changes | event | | stale | + Scenario: Provider events chain ready -> error -> ready + Given a ready event handler + And a error event handler + Then the ready event handler should have been executed + When the connection is lost for 3s + Then the error event handler should have been executed + Then the ready event handler should have been executed + @grace Scenario: Provider events chain ready -> stale -> error -> ready Given a ready event handler And a error event handler And a stale event handler Then the ready event handler should have been executed - When the connection is lost for 6s + When the connection is lost for 3s Then the stale event handler should have been executed Then the error event handler should have been executed Then the ready event handler should have been executed - Scenario: Provider events chain ready -> error -> ready + @grace + Scenario: Provider events chain ready -> stale -> ready Given a ready event handler And a error event handler + And a stale event handler Then the ready event handler should have been executed - When the connection is lost for 6s - Then the error event handler should have been executed + When the connection is lost for 1s + Then the stale event handler should have been executed Then the ready event handler should have been executed Scenario: Flag change event