aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/phases/UpdateStatusJob.java2
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java7
2 files changed, 6 insertions, 3 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/phases/UpdateStatusJob.java b/sonar-batch/src/main/java/org/sonar/batch/phases/UpdateStatusJob.java
index 53d37065bdf..4031462e94a 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/phases/UpdateStatusJob.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/phases/UpdateStatusJob.java
@@ -71,7 +71,7 @@ public class UpdateStatusJob implements BatchComponent {
url = "/batch/upload_report?project=" + project.getEffectiveKey() + "&snapshot=" + snapshot.getId();
try {
LOG.debug("Publish results");
- server.request(url, "POST");
+ server.request(url, "POST", true, 0);
} catch (Exception e) {
throw new IllegalStateException("Unable to publish results: " + url, e);
}
diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java
index d39efd3b698..117bb07f8ca 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/phases/UpdateStatusJobTest.java
@@ -33,7 +33,10 @@ import org.sonar.jpa.test.AbstractDbUnitTestCase;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.contains;
import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
public class UpdateStatusJobTest extends AbstractDbUnitTestCase {
@@ -80,7 +83,7 @@ public class UpdateStatusJobTest extends AbstractDbUnitTestCase {
job.uploadReport();
verify(serverClient).request(contains("/batch_bootstrap/evict"), eq("POST"));
- verify(serverClient).request(contains("/batch/upload_report"), eq("POST"));
+ verify(serverClient).request(contains("/batch/upload_report"), eq("POST"), eq(true), eq(0));
}
@Test