[ 
https://issues.apache.org/jira/browse/IGNITE-10568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16711324#comment-16711324
 ] 

ASF GitHub Bot commented on IGNITE-10568:
-----------------------------------------

asfgit closed pull request #91: IGNITE-10568 Replace type for test id from long 
to String
URL: https://github.com/apache/ignite-teamcity-bot/pull/91
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/tests/TestRef.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/tests/TestRef.java
index 76f6a134..97529633 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/tests/TestRef.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcmodel/result/tests/TestRef.java
@@ -26,6 +26,6 @@
  */
 @XmlRootElement(name = "test")
 public class TestRef extends AbstractRef {
-    @XmlAttribute public Long id;
+    @XmlAttribute public String id;
     @XmlAttribute public String name;
 }
diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/TestCompacted.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/TestCompacted.java
index d7b1a993..d03f9f15 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/TestCompacted.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/teamcity/ignited/fatbuild/TestCompacted.java
@@ -111,7 +111,7 @@ public TestCompacted(IStringCompactor compactor, 
TestOccurrenceFull testOccurren
             actualBuildId = testOccurrence.build.getId();
 
         if (testOccurrence.test != null && testOccurrence.test.id != null)
-            testId = testOccurrence.test.id;
+            testId = Long.valueOf(testOccurrence.test.id);
 
         setDetails(testOccurrence.details);
     }
@@ -166,7 +166,7 @@ public TestOccurrenceFull toTestOccurrence(IStringCompactor 
compactor, int build
         if (testId != 0) {
             TestRef test = new TestRef();
 
-            test.id = testId;
+            test.id = String.valueOf(testId);
 
             occurrence.test = test;
         }
diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/TestFailure.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/TestFailure.java
index 97489111..cf24ebe9 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/TestFailure.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/TestFailure.java
@@ -174,11 +174,13 @@ public void checkAndFillByPrefix(String details, String 
issueLinkPrefix) {
         }
     }
 
-    private static String buildWebLink(ITeamcityIgnited tcIgn, Long id,
+    private static String buildWebLink(ITeamcityIgnited tcIgn, String id,
         @Nullable String projectId, @Nullable String branchName) {
         if (projectId == null)
             return null;
+
         final String branch = branchForLink(branchName);
+
         return tcIgn.host() + "project.html"
             + "?projectId=" + projectId
             + "&testNameId=" + id
diff --git 
a/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessorTest.java
 
b/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessorTest.java
index 453f88f7..6b99340d 100644
--- 
a/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessorTest.java
+++ 
b/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessorTest.java
@@ -295,7 +295,7 @@ private TestOccurrenceFull createPassingTest(long id, 
String name) {
 
         tf.test = new TestRef();
 
-        tf.test.id = id;
+        tf.test.id = String.valueOf(id);
         tf.name = name;
         tf.status = passed ? TestOccurrence.STATUS_SUCCESS : 
TestOccurrence.STATUS_FAILURE;
         return tf;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [TC Bot] Replace type for test id from long to String
> -----------------------------------------------------
>
>                 Key: IGNITE-10568
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10568
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Ryabov Dmitrii
>            Assignee: Ryabov Dmitrii
>            Priority: Trivial
>
> JS long type have less bits for long numbers, so we loose last digits of the 
> number.
> We should use string instead of long for requests, but keep long for cached 
> objects.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to