From 9488399ccca6896e75a1d9f7994fe131b7d982c2 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 4 Dec 2014 09:39:13 +0100 Subject: [PATCH] Fix SearchActionMediumTest (which worked until hardcoded date 2014-12-04) Workaround is not good at all (postponed the date). Waiting for removal of formatted dates in ws response. --- .../server/issue/ws/SearchActionMediumTest.java | 12 ++++++------ .../issue/ws/SearchActionMediumTest/issue.json | 2 +- .../issue_linked_on_removed_file.json | 2 +- .../issues_on_different_projects.json | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java index 578c3a17ccf..83a4641e9d3 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/issue/ws/SearchActionMediumTest.java @@ -158,7 +158,7 @@ public class SearchActionMediumTest { .setReporter("fabrice") .setActionPlanKey("AP-ABCD") .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) - .setIssueUpdateDate(DateUtils.parseDate("2014-12-04")); + .setIssueUpdateDate(DateUtils.parseDate("2017-12-04")); db.issueDao().insert(session, issue); session.commit(); @@ -176,7 +176,7 @@ public class SearchActionMediumTest { .setStatus("OPEN").setResolution("OPEN") .setSeverity("MAJOR") .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) - .setIssueUpdateDate(DateUtils.parseDate("2014-12-04")); + .setIssueUpdateDate(DateUtils.parseDate("2017-12-04")); db.issueDao().insert(session, issue); ComponentDto project2 = ComponentTesting.newProjectDto().setUuid("DBCA").setProjectUuid("DBCA") @@ -200,7 +200,7 @@ public class SearchActionMediumTest { .setStatus("OPEN").setResolution("OPEN") .setSeverity("MAJOR") .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) - .setIssueUpdateDate(DateUtils.parseDate("2014-12-04")); + .setIssueUpdateDate(DateUtils.parseDate("2017-12-04")); db.issueDao().insert(session, issue2); session.commit(); @@ -312,7 +312,7 @@ public class SearchActionMediumTest { .setStatus("OPEN").setResolution("OPEN") .setSeverity("MAJOR") .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) - .setIssueUpdateDate(DateUtils.parseDate("2014-12-04")); + .setIssueUpdateDate(DateUtils.parseDate("2017-12-04")); db.issueDao().insert(session, issue); session.commit(); @@ -436,7 +436,7 @@ public class SearchActionMediumTest { public void display_facets() throws Exception { IssueDto issue = IssueTesting.newDto(rule, file, project) .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) - .setIssueUpdateDate(DateUtils.parseDate("2014-12-04")) + .setIssueUpdateDate(DateUtils.parseDate("2017-12-04")) .setDebt(10L) .setStatus("OPEN") .setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2") @@ -455,7 +455,7 @@ public class SearchActionMediumTest { public void hide_rules() throws Exception { IssueDto issue = IssueTesting.newDto(rule, file, project) .setIssueCreationDate(DateUtils.parseDate("2014-09-04")) - .setIssueUpdateDate(DateUtils.parseDate("2014-12-04")) + .setIssueUpdateDate(DateUtils.parseDate("2017-12-04")) .setDebt(10L) .setStatus("OPEN") .setKee("82fd47d4-b650-4037-80bc-7b112bd4eac2") diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue.json index ce1dbd12f71..f8b21d5396b 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue.json @@ -17,7 +17,7 @@ "assignee": "simon", "reporter": "fabrice", "actionPlan": "AP-ABCD", - "updateDate": "2014-12-04T00:00:00+0100", + "updateDate": "2017-12-04T00:00:00+0100", "fUpdateAge": "less than a minute" } ], diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_linked_on_removed_file.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_linked_on_removed_file.json index 78eb3deaf01..1538300ea9a 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_linked_on_removed_file.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issue_linked_on_removed_file.json @@ -8,7 +8,7 @@ "status": "OPEN", "resolution": "OPEN", "severity": "MAJOR", - "updateDate": "2014-12-04T00:00:00+0100", + "updateDate": "2017-12-04T00:00:00+0100", "fUpdateAge": "less than a minute" } ], diff --git a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issues_on_different_projects.json b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issues_on_different_projects.json index 521cd834b2e..59e9bd71cc0 100644 --- a/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issues_on_different_projects.json +++ b/server/sonar-server/src/test/resources/org/sonar/server/issue/ws/SearchActionMediumTest/issues_on_different_projects.json @@ -8,7 +8,7 @@ "status": "OPEN", "resolution": "OPEN", "severity": "MAJOR", - "updateDate": "2014-12-04T00:00:00+0100", + "updateDate": "2017-12-04T00:00:00+0100", "fUpdateAge": "less than a minute" }, { @@ -19,7 +19,7 @@ "status": "OPEN", "resolution": "OPEN", "severity": "MAJOR", - "updateDate": "2014-12-04T00:00:00+0100", + "updateDate": "2017-12-04T00:00:00+0100", "fUpdateAge": "less than a minute" } ], -- 2.39.5