aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-01-12 14:19:54 +0100
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-01-12 16:13:53 +0100
commit60ca04b430be84f72e05728c1351c23b3cf751b2 (patch)
tree3175a0da86d059a783b269292adecfca1ef9b9d2 /sonar-core
parent058fdebd832e2e8d1ca9612aa939a1894eac5315 (diff)
downloadsonarqube-60ca04b430be84f72e05728c1351c23b3cf751b2.tar.gz
sonarqube-60ca04b430be84f72e05728c1351c23b3cf751b2.zip
change issue_changes timestamp columns to bigint/long
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/issue/db/IssueChangeDto.java88
-rw-r--r--sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java2
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql3
-rw-r--r--sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl6
-rw-r--r--sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDaoTest.java15
-rw-r--r--sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java13
-rw-r--r--sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeMapperTest.java10
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/delete-result.xml16
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/delete.xml16
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/insert-result.xml6
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/select_issue_changelog_by_module.xml40
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/select_issue_changelog_by_module_are_sorted_by_creation_date.xml18
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/shared.xml26
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/update-result.xml60
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/update.xml14
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeMapperTest/insert_comment-result.xml4
-rw-r--r--sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeMapperTest/insert_diff-result.xml6
17 files changed, 172 insertions, 171 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/issue/db/IssueChangeDto.java b/sonar-core/src/main/java/org/sonar/core/issue/db/IssueChangeDto.java
index d3f8d59239a..18b731018f1 100644
--- a/sonar-core/src/main/java/org/sonar/core/issue/db/IssueChangeDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/issue/db/IssueChangeDto.java
@@ -23,6 +23,7 @@ import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.sonar.api.issue.internal.DefaultIssueComment;
import org.sonar.api.issue.internal.FieldDiffs;
+import org.sonar.api.utils.System2;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
@@ -30,6 +31,8 @@ import javax.annotation.Nullable;
import java.io.Serializable;
import java.util.Date;
+import static com.google.common.base.Preconditions.checkNotNull;
+
/**
* @since 3.6
*/
@@ -46,11 +49,40 @@ public final class IssueChangeDto implements Serializable {
private String changeData;
// technical dates
- private Date createdAt;
- private Date updatedAt;
+ private Long createdAt;
+ private Long updatedAt;
// functional date
- private Date issueChangeCreationDate;
+ private Long issueChangeCreationDate;
+
+ public static IssueChangeDto of(DefaultIssueComment comment) {
+ IssueChangeDto dto = newDto(comment.issueKey());
+ dto.setKey(comment.key());
+ dto.setChangeType(IssueChangeDto.TYPE_COMMENT);
+ dto.setChangeData(comment.markdownText());
+ dto.setUserLogin(comment.userLogin());
+ dto.setIssueChangeCreationDate(comment.createdAt() == null ? null : comment.createdAt().getTime());
+ return dto;
+ }
+
+ public static IssueChangeDto of(String issueKey, FieldDiffs diffs) {
+ IssueChangeDto dto = newDto(issueKey);
+ dto.setChangeType(IssueChangeDto.TYPE_FIELD_CHANGE);
+ dto.setChangeData(diffs.toString());
+ dto.setUserLogin(diffs.userLogin());
+ dto.setIssueChangeCreationDate(diffs.creationDate() == null ? null : diffs.creationDate().getTime());
+ return dto;
+ }
+
+ private static IssueChangeDto newDto(String issueKey) {
+ IssueChangeDto dto = new IssueChangeDto();
+ dto.setIssueKey(issueKey);
+
+ // technical dates - do not use the context date
+ dto.setCreatedAt(System2.INSTANCE.now());
+ dto.setUpdatedAt(System2.INSTANCE.now());
+ return dto;
+ }
public Long getId() {
return id;
@@ -107,29 +139,29 @@ public final class IssueChangeDto implements Serializable {
return this;
}
- public Date getCreatedAt() {
+ public Long getCreatedAt() {
return createdAt;
}
- public IssueChangeDto setCreatedAt(Date createdAt) {
- this.createdAt = createdAt;
+ public IssueChangeDto setCreatedAt(Long createdAt) {
+ this.createdAt = checkNotNull(createdAt);
return this;
}
- public Date getUpdatedAt() {
+ public Long getUpdatedAt() {
return updatedAt;
}
- public IssueChangeDto setUpdatedAt(Date updatedAt) {
+ public IssueChangeDto setUpdatedAt(@Nullable Long updatedAt) {
this.updatedAt = updatedAt;
return this;
}
- public Date getIssueChangeCreationDate() {
+ public Long getIssueChangeCreationDate() {
return issueChangeCreationDate;
}
- public IssueChangeDto setIssueChangeCreationDate(Date issueChangeCreationDate) {
+ public IssueChangeDto setIssueChangeCreationDate(@Nullable Long issueChangeCreationDate) {
this.issueChangeCreationDate = issueChangeCreationDate;
return this;
}
@@ -139,42 +171,12 @@ public final class IssueChangeDto implements Serializable {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
- public static IssueChangeDto of(DefaultIssueComment comment) {
- IssueChangeDto dto = newDto(comment.issueKey());
- dto.setKey(comment.key());
- dto.setChangeType(IssueChangeDto.TYPE_COMMENT);
- dto.setChangeData(comment.markdownText());
- dto.setUserLogin(comment.userLogin());
- dto.setIssueChangeCreationDate(comment.createdAt());
- return dto;
- }
-
- public static IssueChangeDto of(String issueKey, FieldDiffs diffs) {
- IssueChangeDto dto = newDto(issueKey);
- dto.setChangeType(IssueChangeDto.TYPE_FIELD_CHANGE);
- dto.setChangeData(diffs.toString());
- dto.setUserLogin(diffs.userLogin());
- dto.setIssueChangeCreationDate(diffs.creationDate());
- return dto;
- }
-
- private static IssueChangeDto newDto(String issueKey) {
- IssueChangeDto dto = new IssueChangeDto();
- dto.setIssueKey(issueKey);
-
- // technical dates - do not use the context date
- Date now = new Date();
- dto.setCreatedAt(now);
- dto.setUpdatedAt(new Date());
- return dto;
- }
-
public DefaultIssueComment toComment() {
return new DefaultIssueComment()
.setMarkdownText(changeData)
.setKey(kee)
- .setCreatedAt(createdAt)
- .setUpdatedAt(updatedAt)
+ .setCreatedAt(new Date(createdAt))
+ .setUpdatedAt(updatedAt == null ? null : new Date(updatedAt))
.setUserLogin(userLogin)
.setIssueKey(issueKey)
.setNew(false);
@@ -184,7 +186,7 @@ public final class IssueChangeDto implements Serializable {
return FieldDiffs.parse(changeData)
.setUserLogin(userLogin)
// issueChangeCreationDate can be null as it has been introduced after createdAt
- .setCreationDate(issueChangeCreationDate != null ? issueChangeCreationDate : createdAt)
+ .setCreationDate(issueChangeCreationDate != null ? new Date(issueChangeCreationDate) : new Date(createdAt))
.setIssueKey(issueKey);
}
}
diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
index 3b2cbb8d129..83c1660265d 100644
--- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
+++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
@@ -33,7 +33,7 @@ import java.util.List;
*/
public class DatabaseVersion implements BatchComponent, ServerComponent {
- public static final int LAST_VERSION = 759;
+ public static final int LAST_VERSION = 762;
/**
* List of all the tables.n
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
index 8914d74ec14..b067306fe9a 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql
@@ -288,6 +288,9 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('756');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('757');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('758');
INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('759');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('760');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('761');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('762');
INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '1418215735482', '1418215735482', null, null);
ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
index 03ce64c522c..3b79cb47b02 100644
--- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
+++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
@@ -474,9 +474,9 @@ CREATE TABLE "ISSUE_CHANGES" (
"USER_LOGIN" VARCHAR(255),
"CHANGE_TYPE" VARCHAR(40),
"CHANGE_DATA" VARCHAR(16777215),
- "CREATED_AT" TIMESTAMP,
- "UPDATED_AT" TIMESTAMP,
- "ISSUE_CHANGE_CREATION_DATE" TIMESTAMP,
+ "CREATED_AT" BIGINT,
+ "UPDATED_AT" BIGINT,
+ "ISSUE_CHANGE_CREATION_DATE" BIGINT
);
CREATE TABLE "ISSUE_FILTERS" (
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDaoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDaoTest.java
index 91dcc972914..b6c047e795d 100644
--- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDaoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDaoTest.java
@@ -68,7 +68,6 @@ public class IssueChangeDaoTest extends AbstractDaoTestCase {
DefaultIssueComment first = comments.get(0);
assertThat(first.markdownText()).isEqualTo("old comment");
-
DefaultIssueComment second = comments.get(1);
assertThat(second.userLogin()).isEqualTo("arthur");
assertThat(second.key()).isEqualTo("FGHIJ");
@@ -81,8 +80,8 @@ public class IssueChangeDaoTest extends AbstractDaoTestCase {
DbSession session = getMyBatis().openSession(false);
List<String> hugeNbOfIssues = newArrayList();
- for (int i=0; i<4500; i++) {
- hugeNbOfIssues.add("ABCD"+i);
+ for (int i = 0; i < 4500; i++) {
+ hugeNbOfIssues.add("ABCD" + i);
}
List<DefaultIssueComment> comments = dao.selectCommentsByIssues(session, hugeNbOfIssues);
MyBatis.closeQuietly(session);
@@ -192,9 +191,9 @@ public class IssueChangeDaoTest extends AbstractDaoTestCase {
.setChangeData("Some text")
.setChangeType("comment")
.setIssueKey("ABCDE")
- .setCreatedAt(DateUtils.parseDate("2014-09-09"))
- .setUpdatedAt(DateUtils.parseDate("2014-09-10"))
- .setIssueChangeCreationDate(DateUtils.parseDate("2014-09-11"));
+ .setCreatedAt(DateUtils.parseDate("2014-09-09").getTime())
+ .setUpdatedAt(DateUtils.parseDate("2014-09-10").getTime())
+ .setIssueChangeCreationDate(DateUtils.parseDate("2014-09-11").getTime());
dao.insert(session, changeDto);
session.commit();
@@ -211,7 +210,7 @@ public class IssueChangeDaoTest extends AbstractDaoTestCase {
// Only the following fields can be updated:
change.setChangeData("new comment");
- change.setUpdatedAt(DateUtils.parseDate("2013-06-30"));
+ change.setUpdatedAt(DateUtils.parseDate("2013-06-30").getTime());
assertThat(dao.update(change)).isTrue();
@@ -227,7 +226,7 @@ public class IssueChangeDaoTest extends AbstractDaoTestCase {
// Only the following fields can be updated:
change.setChangeData("new comment");
- change.setUpdatedAt(DateUtils.parseDate("2013-06-30"));
+ change.setUpdatedAt(DateUtils.parseDate("2013-06-30").getTime());
assertThat(dao.update(change)).isFalse();
}
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java
index ae7523836dc..a3602e8f3f2 100644
--- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeDtoTest.java
@@ -23,8 +23,7 @@ import org.junit.Test;
import org.sonar.api.issue.internal.DefaultIssueComment;
import org.sonar.api.issue.internal.FieldDiffs;
import org.sonar.api.utils.DateUtils;
-
-import java.util.Date;
+import org.sonar.api.utils.System2;
import static org.assertj.core.api.Assertions.assertThat;
@@ -57,7 +56,7 @@ public class IssueChangeDtoTest {
assertThat(dto.getChangeType()).isEqualTo("diff");
assertThat(dto.getCreatedAt()).isNotNull();
assertThat(dto.getUpdatedAt()).isNotNull();
- assertThat(dto.getIssueChangeCreationDate()).isEqualTo(DateUtils.parseDate("2014-01-03"));
+ assertThat(dto.getIssueChangeCreationDate()).isEqualTo(DateUtils.parseDate("2014-01-03").getTime());
assertThat(dto.getIssueKey()).isEqualTo("ABCDE");
assertThat(dto.getUserLogin()).isEqualTo("emmerik");
}
@@ -69,8 +68,8 @@ public class IssueChangeDtoTest {
.setUserLogin("emmerik")
.setChangeData("Some text")
.setIssueKey("ABCDE")
- .setCreatedAt(new Date())
- .setUpdatedAt(new Date());
+ .setCreatedAt(System2.INSTANCE.now())
+ .setUpdatedAt(System2.INSTANCE.now());
DefaultIssueComment comment = changeDto.toComment();
assertThat(comment.key()).isEqualTo("EFGH");
@@ -88,7 +87,7 @@ public class IssueChangeDtoTest {
.setUserLogin("emmerik")
.setChangeData("Some text")
.setIssueKey("ABCDE")
- .setIssueChangeCreationDate(new Date());
+ .setIssueChangeCreationDate(System2.INSTANCE.now());
FieldDiffs diffs = changeDto.toFieldDiffs();
assertThat(diffs.userLogin()).isEqualTo("emmerik");
@@ -103,7 +102,7 @@ public class IssueChangeDtoTest {
.setUserLogin("emmerik")
.setChangeData("Some text")
.setIssueKey("ABCDE")
- .setCreatedAt(new Date());
+ .setCreatedAt(System2.INSTANCE.now());
FieldDiffs diffs = changeDto.toFieldDiffs();
assertThat(diffs.userLogin()).isEqualTo("emmerik");
diff --git a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeMapperTest.java b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeMapperTest.java
index d1a1c8a709e..6c428e4a901 100644
--- a/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeMapperTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/issue/db/IssueChangeMapperTest.java
@@ -27,8 +27,6 @@ import org.sonar.api.utils.DateUtils;
import org.sonar.core.persistence.AbstractDaoTestCase;
import org.sonar.core.persistence.MyBatis;
-import java.util.Date;
-
public class IssueChangeMapperTest extends AbstractDaoTestCase {
SqlSession session;
IssueChangeMapper mapper;
@@ -52,14 +50,14 @@ public class IssueChangeMapperTest extends AbstractDaoTestCase {
dto.setIssueKey("ABCDE");
dto.setChangeType(IssueChangeDto.TYPE_FIELD_CHANGE);
dto.setChangeData("severity=INFO|BLOCKER");
- Date d = DateUtils.parseDate("2013-05-18");
+ long d = DateUtils.parseDate("2013-05-18").getTime();
dto.setCreatedAt(d);
dto.setUpdatedAt(d);
dto.setIssueChangeCreationDate(d);
mapper.insert(dto);
session.commit();
- checkTables("insert_diff", new String[]{"id"}, "issue_changes");
+ checkTables("insert_diff", new String[] {"id"}, "issue_changes");
}
@Test
@@ -70,12 +68,12 @@ public class IssueChangeMapperTest extends AbstractDaoTestCase {
dto.setIssueKey("ABCDE");
dto.setChangeType(IssueChangeDto.TYPE_COMMENT);
dto.setChangeData("the comment");
- Date d = DateUtils.parseDate("2013-05-18");
+ long d = DateUtils.parseDate("2013-05-18").getTime();
dto.setCreatedAt(d);
dto.setUpdatedAt(d);
mapper.insert(dto);
session.commit();
- checkTables("insert_comment", new String[]{"id"}, "issue_changes");
+ checkTables("insert_comment", new String[] {"id"}, "issue_changes");
}
}
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/delete-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/delete-result.xml
index 43980b2e35e..be1549d36f1 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/delete-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/delete-result.xml
@@ -7,8 +7,8 @@
user_login="arthur"
change_type="comment"
change_data="old comment"
- created_at="2013-01-01"
- updated_at="2013-01-01"
+ created_at="1356994800000"
+ updated_at="1356994800000"
issue_change_creation_date="[null]"
/>
@@ -19,9 +19,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-02-02"
- updated_at="2013-02-02"
- issue_change_creation_date="2013-02-02"
+ created_at="1359759600000"
+ updated_at="1359759600000"
+ issue_change_creation_date="1359759600000"
/>
<!--
@@ -34,9 +34,9 @@
user_login="arthur"
change_type="comment"
change_data="recent comment"
- created_at="2013-05-05"
- updated_at="2013-05-05"
- issue_change_creation_date="2013-05-05"
+ created_at="1367704800000"
+ updated_at="1367704800000"
+ issue_change_creation_date="1367704800000"
/>
-->
</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/delete.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/delete.xml
index ffc07f03686..3277acb54ca 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/delete.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/delete.xml
@@ -7,8 +7,8 @@
user_login="arthur"
change_type="comment"
change_data="old comment"
- created_at="2013-01-01"
- updated_at="2013-01-01"
+ created_at="1356994800000"
+ updated_at="1356994800000"
issue_change_creation_date="[null]"
/>
@@ -19,9 +19,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-02-02"
- updated_at="2013-02-02"
- issue_change_creation_date="2013-02-02"
+ created_at="1359759600000"
+ updated_at="1359759600000"
+ issue_change_creation_date="1359759600000"
/>
<issue_changes
@@ -31,8 +31,8 @@
user_login="arthur"
change_type="comment"
change_data="recent comment"
- created_at="2013-05-05"
- updated_at="2013-05-05"
- issue_change_creation_date="2013-05-05"
+ created_at="1367704800000"
+ updated_at="1367704800000"
+ issue_change_creation_date="1367704800000"
/>
</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/insert-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/insert-result.xml
index a91841afa11..6e5a96df545 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/insert-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/insert-result.xml
@@ -7,9 +7,9 @@
user_login="emmerik"
change_type="comment"
change_data="Some text"
- created_at="2014-09-09"
- updated_at="2014-09-10"
- issue_change_creation_date="2014-09-11"
+ created_at="1410213600000"
+ updated_at="1410300000000"
+ issue_change_creation_date="1410386400000"
/>
</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/select_issue_changelog_by_module.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/select_issue_changelog_by_module.xml
index c93aea039d9..cd51c9c7bc0 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/select_issue_changelog_by_module.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/select_issue_changelog_by_module.xml
@@ -38,9 +38,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-04-16"
- updated_at="2013-04-16"
- issue_change_creation_date="2013-04-16"
+ created_at="1410213600000"
+ updated_at="1410213600000"
+ issue_change_creation_date="1410213600000"
/>
<issue_changes
@@ -50,9 +50,9 @@
user_login="arthur"
change_type="diff"
change_data="actionPlan=1.0|1.1"
- created_at="2013-04-16"
- updated_at="2013-04-16"
- issue_change_creation_date="2013-04-16"
+ created_at="1410213600000"
+ updated_at="1410213600000"
+ issue_change_creation_date="1410213600000"
/>
<issue_changes
@@ -62,8 +62,8 @@
user_login="arthur"
change_type="comment"
change_data="recent comment"
- created_at="2013-04-16"
- updated_at="2013-04-16"
+ created_at="1410213600000"
+ updated_at="1410213600000"
issue_change_creation_date="[null]"
/>
@@ -100,9 +100,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-04-16"
- updated_at="2013-04-16"
- issue_change_creation_date="2013-04-16"
+ created_at="1410213600000"
+ updated_at="1410213600000"
+ issue_change_creation_date="1410213600000"
/>
<!-- Closed Issue on a file -->
@@ -138,9 +138,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-04-16"
- updated_at="2013-04-16"
- issue_change_creation_date="2013-04-16"
+ created_at="1410213600000"
+ updated_at="1410213600000"
+ issue_change_creation_date="1410213600000"
/>
<!-- Open Issue on a sub module -->
@@ -176,9 +176,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-04-16"
- updated_at="2013-04-16"
- issue_change_creation_date="2013-04-16"
+ created_at="1410213600000"
+ updated_at="1410213600000"
+ issue_change_creation_date="1410213600000"
/>
<!-- Open Issue on a root module -->
@@ -214,9 +214,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-04-16"
- updated_at="2013-04-16"
- issue_change_creation_date="2013-04-16"
+ created_at="1410213600000"
+ updated_at="1410213600000"
+ issue_change_creation_date="1410213600000"
/>
</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/select_issue_changelog_by_module_are_sorted_by_creation_date.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/select_issue_changelog_by_module_are_sorted_by_creation_date.xml
index f36d8c96a59..29907c71ac0 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/select_issue_changelog_by_module_are_sorted_by_creation_date.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/select_issue_changelog_by_module_are_sorted_by_creation_date.xml
@@ -35,9 +35,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-04-18"
- updated_at="2013-04-18"
- issue_change_creation_date="2013-04-18"
+ created_at="1410386400000"
+ updated_at="1410386400000"
+ issue_change_creation_date="1410386400000"
/>
<issue_changes
@@ -47,9 +47,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-04-16"
- updated_at="2013-04-16"
- issue_change_creation_date="2013-04-16"
+ created_at="1410213600000"
+ updated_at="1410213600000"
+ issue_change_creation_date="1410213600000"
/>
<issue_changes
@@ -59,9 +59,9 @@
user_login="arthur"
change_type="diff"
change_data="actionPlan=1.0|1.1"
- created_at="2013-04-17"
- updated_at="2013-04-17"
- issue_change_creation_date="2013-04-17"
+ created_at="1410300000000"
+ updated_at="1410300000000"
+ issue_change_creation_date="1410300000000"
/>
</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/shared.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/shared.xml
index 48f09145b63..5367328c57c 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/shared.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/shared.xml
@@ -7,8 +7,8 @@
user_login="arthur"
change_type="comment"
change_data="old comment"
- created_at="2013-01-01"
- updated_at="2013-01-01"
+ created_at="1356994800000"
+ updated_at="1356994800000"
issue_change_creation_date="[null]"
/>
@@ -19,9 +19,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-02-02"
- updated_at="2013-02-02"
- issue_change_creation_date="2013-02-02"
+ created_at="1359759600000"
+ updated_at="1359759600000"
+ issue_change_creation_date="1359759600000"
/>
<issue_changes
@@ -31,8 +31,8 @@
user_login="arthur"
change_type="comment"
change_data="recent comment"
- created_at="2013-05-05"
- updated_at="2013-05-05"
+ created_at="1367704800000"
+ updated_at="1367704800000"
issue_change_creation_date="[null]"
/>
@@ -43,9 +43,9 @@
user_login="arthur"
change_type="diff"
change_data="actionPlan=1.0|1.1"
- created_at="2013-02-02"
- updated_at="2013-02-02"
- issue_change_creation_date="2013-02-02"
+ created_at="1359759600000"
+ updated_at="1359759600000"
+ issue_change_creation_date="1359759600000"
/>
<issue_changes
@@ -55,9 +55,9 @@
user_login="henry"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-02-01"
- updated_at="2013-02-01"
- issue_change_creation_date="2013-02-01"
+ created_at="1356994800000"
+ updated_at="1356994800000"
+ issue_change_creation_date="1356994800000"
/>
</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/update-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/update-result.xml
index 31a5056c859..754dfd948f2 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/update-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/update-result.xml
@@ -1,38 +1,38 @@
<dataset>
<issue_changes
- id="100"
- kee="COMMENT-1"
- issue_key="ISSUE-1"
- user_login="arthur"
- change_type="comment"
- change_data="old comment"
- created_at="2013-01-01"
- updated_at="2013-01-01"
- issue_change_creation_date="[null]"
- />
+ id="100"
+ kee="COMMENT-1"
+ issue_key="ISSUE-1"
+ user_login="arthur"
+ change_type="comment"
+ change_data="old comment"
+ created_at="1356994800000"
+ updated_at="1356994800000"
+ issue_change_creation_date="[null]"
+ />
<issue_changes
- id="101"
- kee="[null]"
- issue_key="1000"
- user_login="arthur"
- change_type="diff"
- change_data="severity=MAJOR|BLOCKER"
- created_at="2013-02-02"
- updated_at="2013-02-02"
- issue_change_creation_date="2013-02-02"
- />
+ id="101"
+ kee="[null]"
+ issue_key="1000"
+ user_login="arthur"
+ change_type="diff"
+ change_data="severity=MAJOR|BLOCKER"
+ created_at="1359759600000"
+ updated_at="1359759600000"
+ issue_change_creation_date="1359759600000"
+ />
<issue_changes
- id="102"
- kee="COMMENT-2"
- issue_key="ISSUE-1"
- user_login="arthur"
- change_type="comment"
- change_data="new comment"
- created_at="2013-05-05"
- updated_at="2013-06-30"
- issue_change_creation_date="[null]"
- />
+ id="102"
+ kee="COMMENT-2"
+ issue_key="ISSUE-1"
+ user_login="arthur"
+ change_type="comment"
+ change_data="new comment"
+ created_at="1367704800000"
+ updated_at="1372543200000"
+ issue_change_creation_date="[null]"
+ />
</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/update.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/update.xml
index 94e2ec53877..641f333faa3 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/update.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeDaoTest/update.xml
@@ -7,8 +7,8 @@
user_login="arthur"
change_type="comment"
change_data="old comment"
- created_at="2013-01-01"
- updated_at="2013-01-01"
+ created_at="1356994800000"
+ updated_at="1356994800000"
issue_change_creation_date="[null]"
/>
@@ -19,9 +19,9 @@
user_login="arthur"
change_type="diff"
change_data="severity=MAJOR|BLOCKER"
- created_at="2013-02-02"
- updated_at="2013-02-02"
- issue_change_creation_date="2013-02-02"
+ created_at="1359759600000"
+ updated_at="1359759600000"
+ issue_change_creation_date="1359759600000"
/>
<issue_changes
@@ -31,8 +31,8 @@
user_login="arthur"
change_type="comment"
change_data="old value"
- created_at="2013-05-05"
- updated_at="2013-05-05"
+ created_at="1367704800000"
+ updated_at="1367704800000"
issue_change_creation_date="[null]"
/>
</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeMapperTest/insert_comment-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeMapperTest/insert_comment-result.xml
index 67122e49373..ad0e38ea83d 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeMapperTest/insert_comment-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeMapperTest/insert_comment-result.xml
@@ -6,8 +6,8 @@
user_login="emmerik"
change_type="comment"
change_data="the comment"
- created_at="2013-05-18"
- updated_at="2013-05-18"
+ created_at="1368828000000"
+ updated_at="1368828000000"
issue_change_creation_date="[null]"
/>
</dataset>
diff --git a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeMapperTest/insert_diff-result.xml b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeMapperTest/insert_diff-result.xml
index 164a9d22dd4..d4754f60a06 100644
--- a/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeMapperTest/insert_diff-result.xml
+++ b/sonar-core/src/test/resources/org/sonar/core/issue/db/IssueChangeMapperTest/insert_diff-result.xml
@@ -6,8 +6,8 @@
user_login="emmerik"
change_type="diff"
change_data="severity=INFO|BLOCKER"
- created_at="2013-05-18"
- updated_at="2013-05-18"
- issue_change_creation_date="2013-05-18"
+ created_at="1368828000000"
+ updated_at="1368828000000"
+ issue_change_creation_date="1368828000000"
/>
</dataset>