Skip to content

Commit

Permalink
fix test merge error
Browse files Browse the repository at this point in the history
  • Loading branch information
19mdavenport committed Jun 22, 2024
1 parent f96a236 commit f165c68
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/java/edu/byu/cs/autograder/git/GitHelperUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void makeCommit(RepoContext repoContext, String content, Instant commitTimestamp


GitEvaluator<CommitVerificationResult> evaluateRepo() {
return evaluateRepo(gradingContext, null);
return evaluateRepo(gradingContext, GitHelper.MIN_COMMIT_THRESHOLD);
}
GitEvaluator<CommitVerificationResult> evaluateRepo(@Nullable CommitThreshold minThreshold) {
return evaluateRepo(gradingContext, minThreshold);
Expand All @@ -194,11 +194,11 @@ GitEvaluator<CommitVerificationResult> evaluateRepo(GradingContext gradingContex
return evaluateRepo(new GitHelper(gradingContext), minThreshold);
}
GitEvaluator<CommitVerificationResult> evaluateRepo(GitHelper gitHelper, @Nullable CommitThreshold minThreshold) {
var effectiveMinThreshold = minThreshold != null ? minThreshold : GitHelper.MIN_COMMIT_THRESHOLD;
return git -> {
String phase0HeadHash = GitHelper.getHeadHash(git);
CommitThreshold maxThreshold = new CommitThreshold(Instant.now(), phase0HeadHash);
return gitHelper.verifyRegularCommits(git, effectiveMinThreshold, maxThreshold);
String currentHeadHash = GitHelper.getHeadHash(git);
var maxTimeThreshold = Instant.now().plusSeconds(gradingContext.verificationConfig().forgivenessMinutesHead() * 60L);
CommitThreshold maxThreshold = new CommitThreshold(maxTimeThreshold, currentHeadHash);
return gitHelper.verifyRegularCommits(git, minThreshold, maxThreshold);
};
}

Expand Down

0 comments on commit f165c68

Please sign in to comment.