Skip to content

Commit

Permalink
Fix DistributionSetManagement#updateDistributionSetMetadata test (#2175)
Browse files Browse the repository at this point in the history
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
  • Loading branch information
avgustinmm authored Jan 8, 2025
1 parent 6504bc2 commit 3fde960
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;

import io.qameta.allure.Step;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.assertj.core.api.Assertions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,12 +507,14 @@ void updateDistributionSetMetadata() {
// initial opt lock revision must be zero
assertThat(ds.getOptLockRevision()).isEqualTo(1);

waitNextMillis();
// create an DS meta data entry
createDistributionSetMetadata(ds.getId(), new JpaDistributionSetMetadata(knownKey, ds, knownValue));

final DistributionSet changedLockRevisionDS = getOrThrow(distributionSetManagement.get(ds.getId()));
assertThat(changedLockRevisionDS.getOptLockRevision()).isEqualTo(2);

waitNextMillis();
// update the DS metadata
final JpaDistributionSetMetadata updated = (JpaDistributionSetMetadata) distributionSetManagement
.updateMetaData(ds.getId(), entityFactory.generateDsMetadata(knownKey, knownUpdateValue));
Expand Down

0 comments on commit 3fde960

Please sign in to comment.