From 8ff03bed8d740d764721de4d7d0e7f8a1e02110e Mon Sep 17 00:00:00 2001 From: sopguo Date: Thu, 17 Oct 2024 15:59:54 -0700 Subject: [PATCH] Adding test cases for semantic_long version schema (#2924) Co-authored-by: Sophie Guo --- .../github/ambry/frontend/FrontendIntegrationTestBase.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ambry-frontend/src/integration-test/java/com/github/ambry/frontend/FrontendIntegrationTestBase.java b/ambry-frontend/src/integration-test/java/com/github/ambry/frontend/FrontendIntegrationTestBase.java index f0132f805d..ec7c0bba74 100644 --- a/ambry-frontend/src/integration-test/java/com/github/ambry/frontend/FrontendIntegrationTestBase.java +++ b/ambry-frontend/src/integration-test/java/com/github/ambry/frontend/FrontendIntegrationTestBase.java @@ -440,6 +440,7 @@ List 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; @@ -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"); }