You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2018/10/24 18:15:22 UTC
[ignite-teamcity-bot] branch ignite-9848-load-all-builds updated:
Flags for test were supported
This is an automated email from the ASF dual-hosted git repository.
dpavlov pushed a commit to branch ignite-9848-load-all-builds
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git
The following commit(s) were added to refs/heads/ignite-9848-load-all-builds by this push:
new d04643e Flags for test were supported
d04643e is described below
commit d04643edcdd0bb87d1aa8f82c2b26b889c2eb49a
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Wed Oct 24 21:15:05 2018 +0300
Flags for test were supported
---
.../teamcity/ignited/fatbuild/TestCompacted.java | 38 ++++++++++++++++++++++
1 file changed, 38 insertions(+)
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 3ff4a79..ceceb5d 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
@@ -18,6 +18,7 @@
package org.apache.ignite.ci.teamcity.ignited.fatbuild;
import com.google.common.base.Strings;
+import java.util.BitSet;
import org.apache.ignite.ci.analysis.RunStat;
import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrence;
import org.apache.ignite.ci.teamcity.ignited.IStringCompactor;
@@ -28,6 +29,10 @@ import org.slf4j.LoggerFactory;
*
*/
public class TestCompacted {
+ public static final int MUTED_F = 0;
+ public static final int CUR_MUTED_F = 2;
+ public static final int CUR_INV_F = 4;
+ public static final int IGNORED_F = 6;
/** Id in this build only. Does not idenfity test for its history */
private int idInBuild = -1;
@@ -35,6 +40,8 @@ public class TestCompacted {
private int status = -1;
private int duration = -1;
+ private BitSet flags = new BitSet();
+
/** Logger. */
private static final Logger logger = LoggerFactory.getLogger(TestCompacted.class);
@@ -62,6 +69,32 @@ public class TestCompacted {
name = compactor.getStringId(testOccurrence.name);
status = compactor.getStringId(testOccurrence.status);
duration = testOccurrence.duration == null ? -1 : testOccurrence.duration;
+
+ setFlag(MUTED_F, testOccurrence.muted);
+ setFlag(CUR_MUTED_F, testOccurrence.currentlyMuted);
+ setFlag(CUR_INV_F, testOccurrence.currentlyInvestigated);
+ setFlag(IGNORED_F, testOccurrence.ignored);
+ }
+
+ private void setFlag(int off, Boolean val) {
+ flags.clear(off, off + 2);
+
+ boolean valPresent = val != null;
+ flags.set(off, valPresent);
+
+ if (valPresent)
+ flags.set(off + 1, val);
+ }
+
+
+ /**
+ * @param off Offset.
+ */
+ private Boolean getFlag(int off) {
+ if (!flags.get(off))
+ return null;
+
+ return flags.get(off + 1);
}
public TestOccurrence toTestOccurrence(IStringCompactor compactor, int buildId) {
@@ -77,6 +110,11 @@ public class TestCompacted {
occurrence.status = compactor.getStringFromId(status);
occurrence.href = "/app/rest/latest/testOccurrences/" + fullStrId;
+ occurrence.muted = getFlag(MUTED_F);
+ occurrence.currentlyMuted = getFlag(CUR_MUTED_F);
+ occurrence.currentlyInvestigated = getFlag(CUR_INV_F);
+ occurrence.ignored = getFlag(IGNORED_F);
+
return occurrence;
}