Skip to content

Commit

Permalink
Log change IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
mtughan committed Sep 18, 2024
1 parent d3d37fd commit 1fd7e2d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
import java.nio.file.Path;
import java.util.Collections;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import jenkins.model.Jenkins;
import jenkins.model.ParameterizedJobMixIn;
import me.redaalaoui.gerrit_rest_java_client.thirdparty.com.google.gerrit.extensions.common.ChangeInfo;
Expand All @@ -39,6 +41,7 @@
/** @author Réda Housni Alaoui */
@EnableCluster
class PullRequestAnalysisTest {
private static final Logger LOGGER = Logger.getLogger(PullRequestAnalysisTest.class.getName());

private static final String MAVEN_FREESTYLE_TARGET =
"clean verify sonar:sonar "
Expand Down Expand Up @@ -147,6 +150,7 @@ private GerritChange testWithBadQualityCode(JobFactory jobFactory) throws Except
"src/main/java/org/example/Foo.java",
"package org.example; public class Foo { public Foo() {} }");
GerritChange change = git.createGerritChangeForMaster();
LOGGER.log(Level.INFO, "Testing bad quality code with change {0}", change.changeNumericId());

triggerAndAssertSuccess(jobFactory.build(change));

Expand All @@ -170,6 +174,7 @@ private void testWithGoodQualityCode(
"package org.example; public interface Foo {}",
amend);
GerritChange change = git.createGerritChangeForMaster();
LOGGER.log(Level.INFO, "Testing good quality code with change {0}", change.changeNumericId());

if (previousChange != null) {
assertThat(previousChange.changeNumericId()).isEqualTo(change.changeNumericId());
Expand Down

0 comments on commit 1fd7e2d

Please sign in to comment.