Skip to content

Commit

Permalink
Adding test cases for semantic_long version schema (#2924)
Browse files Browse the repository at this point in the history
Co-authored-by: Sophie Guo <sopguo@sopguo-mn2.linkedin.biz>
  • Loading branch information
SophieGuo410 and Sophie Guo authored Oct 17, 2024
1 parent 6d99a99 commit 8ff03be
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ List<Dataset> doDatasetPutUpdateGetTest(Account account, Container container, Lo
versionSchemas.add(TIMESTAMP);
versionSchemas.add(SEMANTIC);
versionSchemas.add(MONOTONIC);
versionSchemas.add(SEMANTIC_LONG);
for (Dataset.VersionSchema versionSchema : versionSchemas) {
String datasetName = "zzzz" + TestUtils.getRandomString(10);
Dataset dataset;
Expand Down Expand Up @@ -886,6 +887,12 @@ private String generateDatasetVersion(Dataset dataset) {
int minor = random.nextInt(100);
int patch = random.nextInt(100);
version = major + "." + minor + "." + patch;
} else if (SEMANTIC_LONG.equals(datasetVersionSchema)) {
int major = random.nextInt(100);
int minor = random.nextInt(100);
int patch = random.nextInt(100);
int revision = random.nextInt(100);
version = major + "." + minor + "." + patch + "." + revision;
} else {
throw new IllegalArgumentException("This type of version schema is not compatible");
}
Expand Down

0 comments on commit 8ff03be

Please sign in to comment.