import org.json.simple.JSONObject;
import org.junit.Before;
import org.junit.ClassRule;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
private void runConcurrentIssues(final String workDirPath) throws Exception {
// Install sonar-runner in advance to avoid concurrent unzip issues
FileSystem fileSystem = orchestrator.getConfiguration().fileSystem();
- new SonarScannerInstaller(fileSystem).install(Version.create(SonarScanner.DEFAULT_RUNNER_VERSION), fileSystem.workspace());
+ new SonarScannerInstaller(fileSystem).install(Version.create(SonarScanner.DEFAULT_SCANNER_VERSION), fileSystem.workspace(), true);
final int nThreads = 3;
ExecutorService executorService = Executors.newFixedThreadPool(nThreads);
List<Callable<BuildResult>> tasks = new ArrayList<>();
*/
package it.duplication;
+import com.google.common.collect.ObjectArrays;
import com.sonar.orchestrator.Orchestrator;
import com.sonar.orchestrator.locator.FileLocation;
import com.sonar.orchestrator.selenium.Selenese;
import it.Category4Suite;
import java.util.List;
import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.ArrayUtils;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
private static void executeAnalysis(String projectKey, String path, String... additionalProperties) {
runProjectAnalysis(orchestrator, path,
- ArrayUtils.addAll(
+ ObjectArrays.concat(
new String[] {
"sonar.cpd.cross_project", "true",
"sonar.projectKey", projectKey,
"sonar.projectName", projectKey
},
- additionalProperties));
+ additionalProperties, String.class));
}
private static int getMeasure(String projectKey, String metricKey) {
*/
package it.duplication;
+import com.google.common.collect.ObjectArrays;
import com.sonar.orchestrator.Orchestrator;
import com.sonar.orchestrator.locator.FileLocation;
import com.sonar.orchestrator.selenium.Selenese;
import it.Category4Suite;
import java.util.List;
import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang3.ArrayUtils;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
Selenese.builder().setHtmlTestsInClasspath("duplications_widget",
// SONAR-4347
"/duplication/DuplicationsTest/duplications_widget.html").build())
- .runOn(orchestrator);
+ .runOn(orchestrator);
}
private static Resource getComponent(String key) {
orchestrator.getServer().associateProjectToQualityProfile(projectKey, "xoo", "xoo-duplication-profile");
runProjectAnalysis(orchestrator, "duplications/file-duplications",
- ArrayUtils.addAll(
+ ObjectArrays.concat(
new String[] {
"sonar.projectKey", projectKey,
"sonar.projectName", projectKey
},
- additionalProperties));
+ additionalProperties, String.class));
}
private static void verifyWsResultOnDuplicateFile(String fileKey, String ws, String expectedFilePath) throws Exception {
<slf4j.version>1.7.12</slf4j.version>
<tomcat.version>8.0.30</tomcat.version>
<elasticsearch.version>1.7.5</elasticsearch.version>
- <orchestrator.version>3.11-build315</orchestrator.version>
+ <orchestrator.version>3.11</orchestrator.version>
<okhttp.version>2.6.0</okhttp.version>
<protobuf.version>3.0.0-beta-2</protobuf.version>