aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephane Gamard <stephane.gamard@sonarsource.com>2014-09-01 15:58:36 +0200
committerStephane Gamard <stephane.gamard@sonarsource.com>2014-09-01 15:58:36 +0200
commit6e7bec3c465d167c144236b046982354e9901ce9 (patch)
treecc42397e362af176f2d79545eb487a24d9ce7ae8
parent1c4bec1ed7db39be51fe695fec63fc506f460f0c (diff)
downloadsonarqube-6e7bec3c465d167c144236b046982354e9901ce9.tar.gz
sonarqube-6e7bec3c465d167c144236b046982354e9901ce9.zip
fix Ignored test and removed another one
-rw-r--r--server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java9
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/issue/db/IssueBackendMediumTest.java20
2 files changed, 4 insertions, 25 deletions
diff --git a/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java b/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java
index e430aa4f97f..bdf54bb5187 100644
--- a/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java
+++ b/server/sonar-search/src/test/java/org/sonar/search/SearchServerTest.java
@@ -26,7 +26,6 @@ import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -80,12 +79,10 @@ public class SearchServerTest {
}
@Test
- @Ignore
public void server_fail_to_start() throws Exception {
Properties properties = new Properties();
properties.setProperty(MonitoredProcess.NAME_PROPERTY, "ES");
-
searchServer = new SearchServer(new Props(properties));
new Thread(new Runnable() {
@Override
@@ -96,15 +93,15 @@ public class SearchServerTest {
assertThat(searchServer.isReady()).isFalse();
int count = 0;
- while (!searchServer.isReady() && count < 100) {
+ while (!searchServer.isReady() && count < 5) {
try {
- Thread.sleep(500);
+ Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
count++;
}
- assertThat(count).isEqualTo(100);
+ assertThat(count).isEqualTo(5);
}
@Test
diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/db/IssueBackendMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/db/IssueBackendMediumTest.java
index 8443f958525..ae4dbb0e1e7 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/issue/db/IssueBackendMediumTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/issue/db/IssueBackendMediumTest.java
@@ -22,20 +22,14 @@ package org.sonar.server.issue.db;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.sonar.api.resources.Project;
import org.sonar.core.persistence.DbSession;
-import org.sonar.core.rule.RuleDto;
import org.sonar.server.db.DbClient;
import org.sonar.server.platform.Platform;
-import org.sonar.server.rule.RuleTesting;
import org.sonar.server.search.IndexClient;
import org.sonar.server.tester.ServerTester;
public class IssueBackendMediumTest {
-
@ClassRule
public static ServerTester tester = new ServerTester();
@@ -59,16 +53,4 @@ public class IssueBackendMediumTest {
dbSession.close();
}
}
-
- @Test
- @Ignore("work in progress")
- public void insert_select_issue() throws Exception {
- Project project = new Project("my:project");
- RuleDto rule = RuleTesting.newXooX1();
-// //IssueDto issue = IssueDto.createFor(project, rule);
-// System.out.println("issue.getKey() = " + issue.getKey());
-// dbClient.issueDao().insert(dbSession, issue);
-//
-// assertThat(issue.getId()).isNotNull();
- }
-} \ No newline at end of file
+}