]> source.dussan.org Git - sonarqube.git/commitdiff
Fix IssueNotificationsTest
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 14 Dec 2016 14:44:32 +0000 (15:44 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 14 Dec 2016 14:44:32 +0000 (15:44 +0100)
Fail because the analysis date is hardcoded to 2012-12-15,
so 5 years ago. Issues are created and purged in a row !

Signed-off-by: Simon Brandhof <simon.brandhof@sonarsource.com>
it/it-tests/src/test/java/it/issue/IssueNotificationsTest.java

index efdd3c28bf62274a0e198cc1028bd7aa044fccef..6df5027a567d7e9291b05d2296f9e64bdb7312f9 100644 (file)
@@ -113,7 +113,7 @@ public class IssueNotificationsTest extends AbstractIssueTest {
 
   @Test
   public void notifications_for_new_issues_and_issue_changes() throws Exception {
-    runProjectAnalysis(ORCHESTRATOR, "shared/xoo-sample", "sonar.projectDate", "2011-12-15");
+    runProjectAnalysis(ORCHESTRATOR, "shared/xoo-sample", "sonar.projectDate", "2015-12-15");
 
     // change assignee
     Issues issues = issueClient.find(IssueQuery.create().componentRoots(PROJECT_KEY));
@@ -132,7 +132,7 @@ public class IssueNotificationsTest extends AbstractIssueTest {
     assertThat((String) message.getContent()).contains("Severity");
     assertThat((String) message.getContent()).contains("One Issue Per Line (xoo): 17");
     assertThat((String) message.getContent()).contains(
-      "See it in SonarQube: http://localhost:9000/component_issues?id=sample#createdAt=2011-12-15T00%3A00%3A00%2B");
+      "See it in SonarQube: http://localhost:9000/component_issues?id=sample#createdAt=2015-12-15T00%3A00%3A00%2B");
 
     assertThat(emails.hasNext()).isTrue();
     message = emails.next().getMimeMessage();
@@ -165,7 +165,7 @@ public class IssueNotificationsTest extends AbstractIssueTest {
    */
   @Test
   public void notifications_for_bulk_change_ws() throws Exception {
-    runProjectAnalysis(ORCHESTRATOR, "shared/xoo-sample", "sonar.projectDate", "2011-12-15");
+    runProjectAnalysis(ORCHESTRATOR, "shared/xoo-sample", "sonar.projectDate", "2015-12-15");
 
     Issues issues = issueClient.find(IssueQuery.create().componentRoots(PROJECT_KEY));
     Issue issue = issues.list().get(0);