Skip to content

Listener for state change to get rid of timeout in gherkin tests #1629

@ThomasKrieger

Description

@ThomasKrieger

The gherkin tests are flaky because we need to wait for a state change using a timeout:

Awaitility.await().atMost(Duration.ofSeconds(30)).until(() -> {
            ProviderState providerState1 = client.getProviderState();
            return providerState1 == providerState;
        });

We could add an listener on OpenFeatureClient and FeatureProviderStateManager and notify this listener when the state changes.
Than we could use await, anotify insted of using timeouts.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions