Skip to content

Commit

Permalink
feat: add ignore.time.precision.millis
Browse files Browse the repository at this point in the history
  • Loading branch information
pangdayuan1 committed Oct 16, 2023
1 parent 93ea60c commit e758e7c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions arex-schedule-web-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>com.arextest</groupId>
<artifactId>arex-schedule-parent</artifactId>
<version>1.0.38.4</version>
<version>1.0.38.5</version>
</parent>
<packaging>${packagingType}</packaging>
<artifactId>arex-schedule-web-api</artifactId>
<version>1.0.38.4</version>
<version>1.0.38.5</version>


<name>${project.groupId}:${project.artifactId}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.springframework.util.StopWatch;
import org.springframework.beans.factory.annotation.Value;

import java.util.ArrayList;
import java.util.Base64;
Expand All @@ -48,9 +49,11 @@ public class DefaultReplayResultComparer implements ReplayResultComparer {
private static final int INDEX_NOT_FOUND = -1;
private static final CompareSDK COMPARE_INSTANCE = new CompareSDK();
private static final long MAX_TIME = Long.MAX_VALUE;
@Value("${ignore.time.precision.millis}")
private static long ignoreTimePrecisionMillis;

static {
COMPARE_INSTANCE.getGlobalOptions().putNameToLower(true).putNullEqualsEmpty(true).putIgnoredTimePrecision(1000);
COMPARE_INSTANCE.getGlobalOptions().putNameToLower(true).putNullEqualsEmpty(true).putIgnoredTimePrecision(ignoreTimePrecisionMillis);
}

public static CompareSDK getCompareSDKInstance() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ arex.client.https.cert.disable=true

arex.prometheus.port=20092

arex.app.auth.switch=true
arex.app.auth.switch=true
ignore.time.precision.millis=2000
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</modules>
<groupId>com.arextest</groupId>
<artifactId>arex-schedule-parent</artifactId>
<version>1.0.38.4</version>
<version>1.0.38.5</version>


<name>${project.groupId}:${project.artifactId}</name>
Expand Down

0 comments on commit e758e7c

Please sign in to comment.