Skip to content

Commit

Permalink
Fix flaky stateful storage test
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Sep 24, 2024
1 parent a36efc5 commit 484381b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/ert/unit_tests/storage/test_local_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,11 +735,15 @@ def create_ensemble_from_prior(self, prior: Ensemble):
)
assert ensemble in self.storage.ensembles
model_ensemble = Ensemble(ensemble.id)
self.model[experiment_id].ensembles[ensemble.id] = model_ensemble
assert (
ensemble.get_ensemble_state()
== [RealizationStorageState.PARENT_FAILURE] * size
)
model_experiment = self.model[experiment_id]
model_experiment.ensembles[ensemble.id] = model_ensemble
state = [RealizationStorageState.PARENT_FAILURE] * size
iens = 1
if list(prior.response_values.keys()) == [
r.name for r in model_experiment.responses
]:
state[iens] = RealizationStorageState.UNDEFINED
assert ensemble.get_ensemble_state() == state

return model_ensemble

Expand Down

0 comments on commit 484381b

Please sign in to comment.