Skip to content

Commit

Permalink
Fix Jacoco verification
Browse files Browse the repository at this point in the history
Signed-off-by: Louis Chu <[email protected]>
  • Loading branch information
noCharger committed Sep 5, 2024
1 parent ec5627f commit 84a1a4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

/** Parse string raw schedule into job scheduler IntervalSchedule */
public class IntervalScheduleParser {

private static final Pattern DURATION_PATTERN =
Pattern.compile(
"^(\\d+)\\s*(years?|months?|weeks?|days?|hours?|minutes?|minute|mins?|seconds?|secs?|milliseconds?|millis?|microseconds?|microsecond|micros?|micros|nanoseconds?|nanos?)$",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package org.opensearch.sql.spark.scheduler.parser;

import static org.junit.Assert.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand All @@ -25,6 +26,13 @@ public void setup() {
startTime = Instant.now();
}

@Test
public void testConstructor() {
// Test that the constructor of IntervalScheduleParser can be invoked
IntervalScheduleParser parser = new IntervalScheduleParser();
assertNotNull(parser);
}

@Test
public void testParseValidScheduleString() {
verifyParseSchedule(5, "5 minutes");
Expand Down

0 comments on commit 84a1a4d

Please sign in to comment.