Add sharding annotations to android_icu4j test classes.
Some tests were using too much heap, causing excessive garbage
collection and subsequent timeouts. This change adds an annotation
those specifically, so that they can be run in a separate process,
using their own heaps, so avoiding the timeouts.
Some of these tests were suppressed in the past. The suppressions were
undone when ICU 59 landed, which most likely caused problems on
low-memory devices (b/62374714, whose fix was reverted when ICU 59
landed, and perhaps b/37642683). This change (along with the
AndroidTest.xml change to actually apply the sharding) fixes those
problems. This was tested on fugu on an oc build.
Bug: 62512577
Test: cts-tradefed run cts -m CtsIcuTestCases --primary-abi-only
Change-Id: I013ea26728120bbe3238a7a2dd165606ccad243d
diff --git a/android_icu4j/Android.mk b/android_icu4j/Android.mk
index 9005482..42a50cc 100644
--- a/android_icu4j/Android.mk
+++ b/android_icu4j/Android.mk
@@ -35,7 +35,8 @@
# Don't include this package in any target
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := \
- $(call all-java-files-under,src/main/tests)
+ $(call all-java-files-under,src/main/tests) \
+ $(call all-java-files-under,testing/src)
LOCAL_JAVA_RESOURCE_DIRS := src/main/tests
LOCAL_STATIC_JAVA_LIBRARIES := \
android-support-test \
@@ -57,7 +58,9 @@
# Don't include this package in any target
LOCAL_MODULE_TAGS := optional
-LOCAL_SRC_FILES := $(call all-java-files-under,src/main/java)
+LOCAL_SRC_FILES := \
+ $(call all-java-files-under,src/main/java) \
+ $(call all-java-files-under,testing/src)
LOCAL_STATIC_JAVA_LIBRARIES := \
icu4j-icudata-host-jarjar \
icu4j-icutzdata-host-jarjar
@@ -79,7 +82,8 @@
# Don't include this package in any target
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := \
- $(call all-java-files-under,src/main/tests)
+ $(call all-java-files-under,src/main/tests) \
+ $(call all-java-files-under,testing/src)
LOCAL_JAVA_RESOURCE_DIRS := src/main/tests
LOCAL_STATIC_JAVA_LIBRARIES := \
android-icu4j-host \
diff --git a/android_icu4j/src/main/tests/android/icu/dev/data/TestDataElements_testtypes.java b/android_icu4j/src/main/tests/android/icu/dev/data/TestDataElements_testtypes.java
index 9c4205b..affd332 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/data/TestDataElements_testtypes.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/data/TestDataElements_testtypes.java
@@ -9,7 +9,9 @@
*/
package android.icu.dev.data;
import java.util.ListResourceBundle;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestDataElements_testtypes extends ListResourceBundle {
/**
* Overrides ListResourceBundle
diff --git a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements.java b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements.java
index d157848..fcd6b9c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements.java
@@ -10,7 +10,9 @@
package android.icu.dev.data.resources;
import java.util.ListResourceBundle;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestDataElements extends ListResourceBundle {
private static Object[][] data = new Object[][] {
{
diff --git a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_en_Latn_US.java b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_en_Latn_US.java
index 25e5b94..593f2c6 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_en_Latn_US.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_en_Latn_US.java
@@ -10,7 +10,9 @@
package android.icu.dev.data.resources;
import java.util.ListResourceBundle;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestDataElements_en_Latn_US extends ListResourceBundle {
private static Object[][] data = new Object[][] {
{
diff --git a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_en_US.java b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_en_US.java
index abbacc9..c66c16a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_en_US.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_en_US.java
@@ -10,7 +10,9 @@
package android.icu.dev.data.resources;
import java.util.ListResourceBundle;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestDataElements_en_US extends ListResourceBundle {
private static Object[][] data = new Object[][] {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_fr_Latn_FR.java b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_fr_Latn_FR.java
index 106cd85..1d0867a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_fr_Latn_FR.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_fr_Latn_FR.java
@@ -11,7 +11,9 @@
package android.icu.dev.data.resources;
import java.util.ListResourceBundle;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestDataElements_fr_Latn_FR extends ListResourceBundle {
private static Object[][] data = new Object[][] {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_te.java b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_te.java
index ea8c280..2e3d15e 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_te.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestDataElements_te.java
@@ -10,7 +10,9 @@
package android.icu.dev.data.resources;
import java.util.ListResourceBundle;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestDataElements_te extends ListResourceBundle {
private static Object[][] data = new Object[][] {
{
diff --git a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestMessages.java b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestMessages.java
index e2a4a22..d44ed6b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestMessages.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/data/resources/TestMessages.java
@@ -10,7 +10,9 @@
package android.icu.dev.data.resources;
import java.util.ListResourceBundle;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestMessages extends ListResourceBundle {
@Override
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/ModuleTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/ModuleTest.java
index 2b2130d..8478a88 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/ModuleTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/ModuleTest.java
@@ -17,6 +17,7 @@
import android.icu.dev.test.TestDataModule.DataModuleFormatError;
import android.icu.dev.test.TestDataModule.Factory;
import android.icu.dev.test.TestDataModule.TestData;
+import android.icu.testsharding.MainTestShard;
/**
* Ray: An adapter class for TestDataMoule to make it like TestFmwk
@@ -33,6 +34,7 @@
*
* See CollationTest for an example.
*/
+@MainTestShard
public class ModuleTest {
private ModuleTest() {
// prevent construction
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/TestLocaleNamePackaging.java b/android_icu4j/src/main/tests/android/icu/dev/test/TestLocaleNamePackaging.java
index 810214a..1917b1d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/TestLocaleNamePackaging.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/TestLocaleNamePackaging.java
@@ -20,7 +20,9 @@
import android.icu.text.LocaleDisplayNames;
import android.icu.text.LocaleDisplayNames.DialectHandling;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestLocaleNamePackaging extends TestFmwk {
public TestLocaleNamePackaging() {
}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/TestUtil.java b/android_icu4j/src/main/tests/android/icu/dev/test/TestUtil.java
index 9ba7aab..740fd7b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/TestUtil.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/TestUtil.java
@@ -16,7 +16,9 @@
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Locale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public final class TestUtil {
/**
* Path to test data in icu4jtest.jar
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/UTF16Util.java b/android_icu4j/src/main/tests/android/icu/dev/test/UTF16Util.java
index 56bb0a1..eb09f7d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/UTF16Util.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/UTF16Util.java
@@ -9,6 +9,8 @@
*/
package android.icu.dev.test;
+import android.icu.testsharding.MainTestShard;
+
/**
* Utility class for supplementary code point
* support. This one is written purely for updating
@@ -17,6 +19,7 @@
* from ICU4J
* @author Vladimir Weinstein, Markus Scherer
*/
+@MainTestShard
public class UTF16Util {
static final int suppOffset = (0xd800 << 10) + 0xdc00 - 0x10000;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/BiDiConformanceTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/BiDiConformanceTest.java
index f1952f2..2d6261e 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/BiDiConformanceTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/BiDiConformanceTest.java
@@ -19,12 +19,14 @@
import android.icu.lang.UCharacterDirection;
import android.icu.text.Bidi;
import android.icu.text.BidiClassifier;
+import android.icu.testsharding.MainTestShard;
/**
* @author Markus W. Scherer
* BiDi conformance test, using the Unicode BidiTest.txt and BidiCharacterTest.txt files.
* Ported from ICU4C intltest/bidiconf.cpp .
*/
+@MainTestShard
public class BiDiConformanceTest extends TestFmwk {
public BiDiConformanceTest() {}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/BidiFmwk.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/BidiFmwk.java
index b74a1bf..9e87c13 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/BidiFmwk.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/BidiFmwk.java
@@ -18,6 +18,7 @@
import android.icu.text.Bidi;
import android.icu.text.BidiRun;
import android.icu.util.VersionInfo;
+import android.icu.testsharding.MainTestShard;
/**
* A base class for the Bidi test suite.
@@ -25,6 +26,7 @@
* @author Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class BidiFmwk extends TestFmwk {
protected static final char[] charFromDirProp = {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestBidi.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestBidi.java
index abc5a2b..dda7e77 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestBidi.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestBidi.java
@@ -16,6 +16,7 @@
import android.icu.text.Bidi;
import android.icu.text.BidiRun;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for Bidi class override.
@@ -23,6 +24,7 @@
* @author Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class TestBidi extends BidiFmwk {
private static final int MAXLEN = 256;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestBidiTransform.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestBidiTransform.java
index a2aa1a3..e8fe79b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestBidiTransform.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestBidiTransform.java
@@ -13,6 +13,7 @@
import android.icu.text.BidiTransform;
import android.icu.text.BidiTransform.Mirroring;
import android.icu.text.BidiTransform.Order;
+import android.icu.testsharding.MainTestShard;
/**
* Verify Bidi Layout Transformations
@@ -20,6 +21,7 @@
* @author Lina Kemmel
*
*/
+@MainTestShard
public class TestBidiTransform extends TestFmwk {
static final char LATN_ZERO = '\u0030';
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestCharFromDirProp.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestCharFromDirProp.java
index 9ea5b8e..78aeba2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestCharFromDirProp.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestCharFromDirProp.java
@@ -15,6 +15,7 @@
import android.icu.impl.Utility;
import android.icu.lang.UCharacter;
import android.icu.lang.UCharacterDirection;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for Bidi charFromDirProp
@@ -22,6 +23,7 @@
* @author Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class TestCharFromDirProp extends BidiFmwk {
/* verify that the exemplar characters have the expected bidi classes */
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestClassOverride.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestClassOverride.java
index fa248c3..890e32b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestClassOverride.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestClassOverride.java
@@ -14,6 +14,7 @@
import android.icu.text.Bidi;
import android.icu.text.BidiClassifier;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for Bidi class override.
@@ -21,6 +22,7 @@
* @author Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class TestClassOverride extends BidiFmwk {
private static final int DEF = TestData.DEF;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestCompatibility.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestCompatibility.java
index 0d5090a..701fac8 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestCompatibility.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestCompatibility.java
@@ -18,6 +18,7 @@
import org.junit.Test;
import android.icu.text.Bidi;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for java.text.Bidi compatibility
@@ -25,6 +26,7 @@
* @author Matitiahu Allouche
*/
+@MainTestShard
public class TestCompatibility extends BidiFmwk {
void compareBidi(Bidi bidi, java.text.Bidi jbidi)
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestContext.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestContext.java
index cd0d61d..ceb438c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestContext.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestContext.java
@@ -13,6 +13,7 @@
import org.junit.Test;
import android.icu.text.Bidi;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for doing transformations in context
@@ -20,6 +21,7 @@
* @author Matitiahu Allouche
*/
+@MainTestShard
public class TestContext extends BidiFmwk {
private class ContextCase {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestData.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestData.java
index 00fa429..c444dc7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestData.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestData.java
@@ -12,6 +12,7 @@
import android.icu.lang.UCharacterDirection;
import android.icu.text.Bidi;
+import android.icu.testsharding.MainTestShard;
/**
@@ -20,6 +21,7 @@
* Ported from C by Lina Kemmel, Matitiahu Allouche
*
*/
+@MainTestShard
public class TestData {
protected static final int L = UCharacterDirection.LEFT_TO_RIGHT;
protected static final int R = UCharacterDirection.RIGHT_TO_LEFT;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestFailureRecovery.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestFailureRecovery.java
index df1adb2..2180358 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestFailureRecovery.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestFailureRecovery.java
@@ -13,6 +13,7 @@
import org.junit.Test;
import android.icu.text.Bidi;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for Bidi failure recovery
@@ -20,6 +21,7 @@
* @author Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class TestFailureRecovery extends BidiFmwk {
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestInverse.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestInverse.java
index b8a6fa1..a872deb 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestInverse.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestInverse.java
@@ -16,6 +16,7 @@
import android.icu.impl.Utility;
import android.icu.text.Bidi;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for the basic "inverse" Bidi mode.
@@ -23,6 +24,7 @@
* ported from C by Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class TestInverse extends BidiFmwk {
private int countRoundtrips = 0;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestMultipleParagraphs.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestMultipleParagraphs.java
index b1c9142..12d555f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestMultipleParagraphs.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestMultipleParagraphs.java
@@ -17,6 +17,7 @@
import android.icu.impl.Utility;
import android.icu.text.Bidi;
import android.icu.text.BidiRun;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for Bidi multiple paragraphs
@@ -24,6 +25,7 @@
* @author Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class TestMultipleParagraphs extends BidiFmwk {
private static final String text =
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorder.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorder.java
index d0a6f66..c7d04a8 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorder.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorder.java
@@ -13,6 +13,7 @@
import org.junit.Test;
import android.icu.text.Bidi;
+import android.icu.testsharding.MainTestShard;
/**
@@ -21,6 +22,7 @@
* ported from C by Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class TestReorder extends BidiFmwk {
private static final String[] logicalOrder = {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderArabicMathSymbols.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderArabicMathSymbols.java
index e14c800..622839f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderArabicMathSymbols.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderArabicMathSymbols.java
@@ -12,6 +12,7 @@
import org.junit.Test;
import android.icu.text.Bidi;
+import android.icu.testsharding.MainTestShard;
/**
@@ -20,6 +21,7 @@
* Ported from C by Ramy Said
*/
+@MainTestShard
public class TestReorderArabicMathSymbols extends BidiFmwk {
private static final String[] logicalOrder = {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderRunsOnly.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderRunsOnly.java
index 1b1450e..cc774af 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderRunsOnly.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderRunsOnly.java
@@ -13,6 +13,7 @@
import org.junit.Test;
import android.icu.text.Bidi;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for variants to the UBA.
@@ -20,6 +21,7 @@
* @author Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class TestReorderRunsOnly extends BidiFmwk {
static class TestCase {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderingMode.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderingMode.java
index 9545946..d70c9c4 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderingMode.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestReorderingMode.java
@@ -15,6 +15,7 @@
import org.junit.Test;
import android.icu.text.Bidi;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for variants to the UBA.
@@ -22,6 +23,7 @@
* @author Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class TestReorderingMode extends BidiFmwk {
static final String[] textIn = {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestStreaming.java b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestStreaming.java
index 18dc2c9..cf7bb25 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestStreaming.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bidi/TestStreaming.java
@@ -14,6 +14,7 @@
import android.icu.impl.Utility;
import android.icu.text.Bidi;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for streaming mode
@@ -21,6 +22,7 @@
* @author Lina Kemmel, Matitiahu Allouche
*/
+@MainTestShard
public class TestStreaming extends BidiFmwk {
static final int MAXPORTIONS = 10;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/bigdec/DiagBigDecimalTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/bigdec/DiagBigDecimalTest.java
index 2e1808c..fc4f6aa 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/bigdec/DiagBigDecimalTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/bigdec/DiagBigDecimalTest.java
@@ -20,6 +20,7 @@
import android.icu.dev.test.TestUtil;
import android.icu.dev.test.TestUtil.JavaVendor;
import android.icu.math.BigDecimal;
+import android.icu.testsharding.MainTestShard;
/* ------------------------------------------------------------------ */
/* Decimal diagnostic tests mfc */
@@ -98,6 +99,7 @@
* @author Mike Cowlishaw
*/
+@MainTestShard
public class DiagBigDecimalTest extends TestFmwk {
private static final android.icu.math.BigDecimal zero = android.icu.math.BigDecimal.ZERO;
private static final android.icu.math.BigDecimal one = android.icu.math.BigDecimal.ONE;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/AstroTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/AstroTest.java
index 2ac87be..60f8d91 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/AstroTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/AstroTest.java
@@ -25,9 +25,11 @@
import android.icu.util.GregorianCalendar;
import android.icu.util.SimpleTimeZone;
import android.icu.util.TimeZone;
+import android.icu.testsharding.MainTestShard;
// TODO: try finding next new moon after 07/28/1984 16:00 GMT
+@MainTestShard
public class AstroTest extends TestFmwk {
static final double PI = Math.PI;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CalendarRegressionTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CalendarRegressionTest.java
index 5d6ce4a..6fb0ff9 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CalendarRegressionTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CalendarRegressionTest.java
@@ -31,6 +31,7 @@
import android.icu.util.SimpleTimeZone;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @test 1.32 99/11/14
@@ -40,6 +41,7 @@
* 4145158 4145983 4147269 4149677 4162587 4165343 4166109 4167060 4173516
* 4174361 4177484 4197699 4209071 4288792
*/
+@MainTestShard
public class CalendarRegressionTest extends android.icu.dev.test.TestFmwk {
static final String[] FIELD_NAME = {
"ERA", "YEAR", "MONTH", "WEEK_OF_YEAR", "WEEK_OF_MONTH",
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CalendarTestFmwk.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CalendarTestFmwk.java
index 3b183ba..45b7de6 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CalendarTestFmwk.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CalendarTestFmwk.java
@@ -22,11 +22,13 @@
import android.icu.util.ChineseCalendar;
import android.icu.util.GregorianCalendar;
import android.icu.util.SimpleTimeZone;
+import android.icu.testsharding.MainTestShard;
/**
* A base class for classes that test individual Calendar subclasses.
* Defines various useful utility methods and constants
*/
+@MainTestShard
public class CalendarTestFmwk extends TestFmwk {
// Constants for use by subclasses, solely to save typing
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/ChineseTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/ChineseTest.java
index 8e95c30..1a7dbca 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/ChineseTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/ChineseTest.java
@@ -21,6 +21,7 @@
import android.icu.util.GregorianCalendar;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Test of ChineseCalendar.
@@ -64,6 +65,7 @@
* Tue May 22 2096 = 4733-04*-01, Year 53, Cycle 79
* Sun Mar 22 2099 = 4736-02*-01, Year 56, Cycle 79
*/
+@MainTestShard
public class ChineseTest extends CalendarTestFmwk {
/**
* Test basic mapping to and from Gregorian.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/ChineseTestCase.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/ChineseTestCase.java
index 861c04c..333fe6f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/ChineseTestCase.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/ChineseTestCase.java
@@ -11,7 +11,9 @@
import java.util.Date;
import android.icu.util.Calendar;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class ChineseTestCase extends TestCase {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CompatibilityTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CompatibilityTest.java
index 287d740..56e6f95 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CompatibilityTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CompatibilityTest.java
@@ -25,7 +25,9 @@
import android.icu.util.GregorianCalendar;
import android.icu.util.SimpleTimeZone;
import android.icu.util.TimeZone;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CompatibilityTest extends android.icu.dev.test.TestFmwk {
static final String[] FIELD_NAME = {
"ERA", "YEAR", "MONTH", "WEEK_OF_YEAR", "WEEK_OF_MONTH",
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CopticTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CopticTest.java
index eb8a825..04a79b5 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CopticTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/CopticTest.java
@@ -23,10 +23,12 @@
import android.icu.util.GregorianCalendar;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Tests for the <code>CopticCalendar</code> class.
*/
+@MainTestShard
public class CopticTest extends CalendarTestFmwk
{
/** Constants to save typing. */
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/DangiTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/DangiTest.java
index 69c6996..327f8c4 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/DangiTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/DangiTest.java
@@ -18,7 +18,9 @@
import android.icu.util.GregorianCalendar;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class DangiTest extends CalendarTestFmwk {
/**
* Test basic mapping to and from Gregorian.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/DataDrivenCalendarTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/DataDrivenCalendarTest.java
index 1d0fe8f..056dec1 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/DataDrivenCalendarTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/DataDrivenCalendarTest.java
@@ -31,6 +31,7 @@
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
+import android.icu.testsharding.MainTestShard;
/**
* @author srl
@@ -39,6 +40,7 @@
* analog of dadrcal.cpp
*
*/
+@MainTestShard
@RunWith(JUnitParamsRunner.class)
public class DataDrivenCalendarTest extends TestFmwk {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/EthiopicTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/EthiopicTest.java
index 5a7a6b8..42523a7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/EthiopicTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/EthiopicTest.java
@@ -22,10 +22,12 @@
import android.icu.util.GregorianCalendar;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Tests for the <code>EthiopicCalendar</code> class.
*/
+@MainTestShard
public class EthiopicTest extends CalendarTestFmwk
{
/** Constants to save typing. */
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/HebrewTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/HebrewTest.java
index 348758d..d40e7f5 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/HebrewTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/HebrewTest.java
@@ -21,10 +21,12 @@
import android.icu.util.HebrewCalendar;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Tests for the <code>HebrewCalendar</code> class.
*/
+@MainTestShard
public class HebrewTest extends CalendarTestFmwk {
// Constants to save typing.
public static final int TISHRI = HebrewCalendar.TISHRI;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/HolidayTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/HolidayTest.java
index 772b72d..d7262ec 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/HolidayTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/HolidayTest.java
@@ -26,10 +26,12 @@
import android.icu.util.SimpleHoliday;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Tests for the <code>Holiday</code> class.
*/
+@MainTestShard
public class HolidayTest extends TestFmwk {
@Before
public void init() throws Exception {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IBMCalendarTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IBMCalendarTest.java
index 5e243c5..1ff38f5 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IBMCalendarTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IBMCalendarTest.java
@@ -32,10 +32,12 @@
import android.icu.util.TimeZone;
import android.icu.util.TimeZone.SystemTimeZoneType;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @summary Tests of new functionality in IBMCalendar
*/
+@MainTestShard
public class IBMCalendarTest extends CalendarTestFmwk {
/**
* Test weekend support in IBMCalendar.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IndianTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IndianTest.java
index 23e4f96..877c4ef 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IndianTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IndianTest.java
@@ -22,10 +22,12 @@
import android.icu.util.IndianCalendar;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Tests for the <code>IndianCalendar</code> class.
*/
+@MainTestShard
public class IndianTest extends CalendarTestFmwk
{
// Months in indian calendar are 0-based. Here taking 1-based names:
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IslamicTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IslamicTest.java
index 0bbb5f1..3ad5925 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IslamicTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/IslamicTest.java
@@ -29,10 +29,12 @@
import android.icu.util.IslamicCalendar.CalculationType;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Tests for the <code>IslamicCalendar</code> class.
*/
+@MainTestShard
public class IslamicTest extends CalendarTestFmwk {
/** Constants to save typing. */
public static final int MUHARRAM = IslamicCalendar.MUHARRAM;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/JapaneseTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/JapaneseTest.java
index 68fae33..eab03a0 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/JapaneseTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/JapaneseTest.java
@@ -23,10 +23,12 @@
import android.icu.util.JapaneseCalendar;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Tests for the <code>JapaneseCalendar</code> class.
*/
+@MainTestShard
public class JapaneseTest extends CalendarTestFmwk {
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/PersianTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/PersianTest.java
index 19e602f..06737c9 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/PersianTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/PersianTest.java
@@ -15,7 +15,9 @@
import android.icu.util.Calendar;
import android.icu.util.PersianCalendar;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class PersianTest extends CalendarTestFmwk {
/**
* Test basic mapping to and from Gregorian.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/TestCase.java b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/TestCase.java
index d20884c..0c66fed 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/calendar/TestCase.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/calendar/TestCase.java
@@ -16,6 +16,7 @@
import android.icu.util.Calendar;
import android.icu.util.GregorianCalendar;
import android.icu.util.SimpleTimeZone;
+import android.icu.testsharding.MainTestShard;
/**
* A pseudo <code>Calendar</code> that is useful for testing
@@ -26,6 +27,7 @@
* tested, and the equals and fieldsEqual methods are used to ensure
* that the calendar has ended up in the right state.
*/
+@MainTestShard
public class TestCase {
//------------------------------------------------------------------
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/charsetdet/TestCharsetDetector.java b/android_icu4j/src/main/tests/android/icu/dev/test/charsetdet/TestCharsetDetector.java
index f83d5bc..78cb202 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/charsetdet/TestCharsetDetector.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/charsetdet/TestCharsetDetector.java
@@ -34,11 +34,13 @@
import android.icu.impl.Utility;
import android.icu.text.CharsetDetector;
import android.icu.text.CharsetMatch;
+import android.icu.testsharding.MainTestShard;
/**
* @author andy
*/
+@MainTestShard
public class TestCharsetDetector extends TestFmwk
{
public TestCharsetDetector()
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/cldr/TestCLDRVsICU.java b/android_icu4j/src/main/tests/android/icu/dev/test/cldr/TestCLDRVsICU.java
index ccbf188..409942e 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/cldr/TestCLDRVsICU.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/cldr/TestCLDRVsICU.java
@@ -47,6 +47,7 @@
import android.icu.util.Currency;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* This is a test file that takes in the CLDR XML test files and test against
@@ -74,6 +75,7 @@
* @author medavis
* @author John Huan Vu (johnvu@us.ibm.com)
*/
+@MainTestShard
public class TestCLDRVsICU extends TestFmwk {
static final boolean DEBUG = false;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/AlphabeticIndexTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/AlphabeticIndexTest.java
index e4ca2c1..e692250 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/AlphabeticIndexTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/AlphabeticIndexTest.java
@@ -40,10 +40,12 @@
import android.icu.text.UTF16;
import android.icu.text.UnicodeSet;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author Mark Davis
*/
+@MainTestShard
public class AlphabeticIndexTest extends TestFmwk {
/**
*
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationAPITest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationAPITest.java
index 0f3b648..ff7bfbc 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationAPITest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationAPITest.java
@@ -38,7 +38,9 @@
import android.icu.text.UnicodeSet;
import android.icu.util.ULocale;
import android.icu.util.VersionInfo;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationAPITest extends TestFmwk {
/**
* This tests the collation key related APIs.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationChineseTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationChineseTest.java
index df0a712..f08933c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationChineseTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationChineseTest.java
@@ -22,7 +22,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.Collator;
import android.icu.text.RuleBasedCollator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationChineseTest extends TestFmwk{
public CollationChineseTest()
{
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationCreationMethodTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationCreationMethodTest.java
index 385ba41..a7d99c8 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationCreationMethodTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationCreationMethodTest.java
@@ -19,6 +19,7 @@
import android.icu.text.CollationKey;
import android.icu.text.Collator;
import android.icu.text.RuleBasedCollator;
+import android.icu.testsharding.MainTestShard;
/**
@@ -29,6 +30,7 @@
* @author Brian Rower - IBM - August 2008
*
*/
+@MainTestShard
public class CollationCreationMethodTest extends TestFmwk
{
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationCurrencyTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationCurrencyTest.java
index dfdc55c..22f5b5b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationCurrencyTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationCurrencyTest.java
@@ -23,7 +23,9 @@
import android.icu.text.CollationKey;
import android.icu.text.Collator;
import android.icu.text.RuleBasedCollator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationCurrencyTest extends TestFmwk {
@Test
public void TestCurrency() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationDummyTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationDummyTest.java
index c03b1ea..ea43fe0 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationDummyTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationDummyTest.java
@@ -27,7 +27,9 @@
import android.icu.text.Collator;
import android.icu.text.Normalizer;
import android.icu.text.RuleBasedCollator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationDummyTest extends TestFmwk {
//testSourceCases[][] and testTargetCases[][], testCases[][] are ported from the file callcoll.c in icu4c
private static char[][] testSourceCases = {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationEnglishTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationEnglishTest.java
index fc979af..9ee33e1 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationEnglishTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationEnglishTest.java
@@ -23,7 +23,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.CollationKey;
import android.icu.text.Collator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationEnglishTest extends TestFmwk{
private static char[][] testSourceCases = {
{0x0061 /* 'a' */, 0x0062 /* 'b' */},
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFinnishTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFinnishTest.java
index d0270c4..5acb5dc 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFinnishTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFinnishTest.java
@@ -22,7 +22,9 @@
import android.icu.text.CollationKey;
import android.icu.text.Collator;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationFinnishTest extends TestFmwk {
private static char[][] testSourceCases = {
{0x77, 0x61, 0x74},
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFrenchTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFrenchTest.java
index 4566d91..814c1ff 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFrenchTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFrenchTest.java
@@ -24,7 +24,9 @@
import android.icu.text.CollationKey;
import android.icu.text.Collator;
import android.icu.text.RuleBasedCollator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationFrenchTest extends TestFmwk{
private static char[][] testSourceCases = {
{0x0061/*'a'*/, 0x0062/*'b'*/, 0x0063/*'c'*/},
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFrozenMonkeyTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFrozenMonkeyTest.java
index 1efbe89..7ced884 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFrozenMonkeyTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationFrozenMonkeyTest.java
@@ -24,6 +24,7 @@
import android.icu.text.CollationKey;
import android.icu.text.Collator;
import android.icu.text.RuleBasedCollator;
+import android.icu.testsharding.MainTestShard;
/**
* CollationFrozenMonkeyTest is a third level test class. This tests the random
@@ -32,6 +33,7 @@
* less than the string itself appended with any character.
*/
+@MainTestShard
public class CollationFrozenMonkeyTest extends TestFmwk {
private String source = "-abcdefghijklmnopqrstuvwxyz#&^$@";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationGermanTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationGermanTest.java
index 890dda4..be1a59f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationGermanTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationGermanTest.java
@@ -23,8 +23,10 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.CollationKey;
import android.icu.text.Collator;
+import android.icu.testsharding.MainTestShard;
- public class CollationGermanTest extends TestFmwk{
+ @MainTestShard
+public class CollationGermanTest extends TestFmwk{
private static char[][] testSourceCases = {
{0x47, 0x72, 0x00F6, 0x00DF, 0x65},
{0x61, 0x62, 0x63},
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationIteratorTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationIteratorTest.java
index 8215dcd..cd15e30 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationIteratorTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationIteratorTest.java
@@ -29,7 +29,9 @@
import android.icu.text.RuleBasedCollator;
import android.icu.text.UCharacterIterator;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationIteratorTest extends TestFmwk {
String test1 = "What subset of all possible test cases?";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationKanaTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationKanaTest.java
index 74ce1d6..0f5e78c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationKanaTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationKanaTest.java
@@ -25,7 +25,9 @@
import android.icu.text.Collator;
import android.icu.text.RuleBasedCollator;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationKanaTest extends TestFmwk{
private static char[][] testSourceCases = {
{0xff9E},
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationMiscTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationMiscTest.java
index 83ae530..c4e6ab7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationMiscTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationMiscTest.java
@@ -41,7 +41,9 @@
import android.icu.text.UnicodeSetIterator;
import android.icu.util.ULocale;
import android.icu.util.UResourceBundle;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationMiscTest extends TestFmwk {
//private static final int NORM_BUFFER_TEST_LEN_ = 32;
private static final class Tester
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationMonkeyTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationMonkeyTest.java
index 5d98415..a365beb 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationMonkeyTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationMonkeyTest.java
@@ -24,6 +24,7 @@
import android.icu.text.CollationKey;
import android.icu.text.Collator;
import android.icu.text.RuleBasedCollator;
+import android.icu.testsharding.MainTestShard;
/**
* CollationMonkeyTest is a third level test class. This tests the random
@@ -32,6 +33,7 @@
* less than the string itself appended with any character.
*/
+@MainTestShard
public class CollationMonkeyTest extends TestFmwk {
private String source = "-abcdefghijklmnopqrstuvwxyz#&^$@";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationRegressionTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationRegressionTest.java
index 3987dc5..88f4420 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationRegressionTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationRegressionTest.java
@@ -27,7 +27,9 @@
import android.icu.text.CollationKey;
import android.icu.text.Collator;
import android.icu.text.RuleBasedCollator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationRegressionTest extends TestFmwk {
// @bug 4048446
//
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationServiceTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationServiceTest.java
index 811ef34..6101901 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationServiceTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationServiceTest.java
@@ -26,7 +26,9 @@
import android.icu.text.Collator;
import android.icu.text.Collator.CollatorFactory;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationServiceTest extends TestFmwk {
@Test
public void TestRegister() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationSpanishTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationSpanishTest.java
index 5f5e85c..118c6d2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationSpanishTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationSpanishTest.java
@@ -23,8 +23,10 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.CollationKey;
import android.icu.text.Collator;
+import android.icu.testsharding.MainTestShard;
- public class CollationSpanishTest extends TestFmwk {
+ @MainTestShard
+public class CollationSpanishTest extends TestFmwk {
private static char[][] testSourceCases = {
{0x61, 0x6c, 0x69, 0x61, 0x73},
{0x45, 0x6c, 0x6c, 0x69, 0x6f, 0x74},
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationTest.java
index 133c7c6..63642b1 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationTest.java
@@ -50,7 +50,9 @@
import android.icu.util.IllformedLocaleException;
import android.icu.util.Output;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationTest extends TestFmwk {
public CollationTest() {
}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationThaiTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationThaiTest.java
index d843c3f..8ec1bd2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationThaiTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationThaiTest.java
@@ -29,7 +29,9 @@
import android.icu.text.CollationKey;
import android.icu.text.Collator;
import android.icu.text.RuleBasedCollator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationThaiTest extends TestFmwk {
final int MAX_FAILURES_TO_SHOW = -1;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationThreadTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationThreadTest.java
index 2d57c55..5e43f65 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationThreadTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationThreadTest.java
@@ -16,7 +16,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.Collator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationThreadTest extends TestFmwk {
private static final String[] threadTestData;
static {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationTurkishTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationTurkishTest.java
index 1634370..d84ce6b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationTurkishTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/CollationTurkishTest.java
@@ -23,7 +23,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.CollationKey;
import android.icu.text.Collator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CollationTurkishTest extends TestFmwk{
private static char[][] testSourceCases = {
{0x73, 0x0327},
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/Counter.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/Counter.java
index b00f3e3..24de11e 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/Counter.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/Counter.java
@@ -20,7 +20,9 @@
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class Counter<T> implements Iterable<T>, Comparable<Counter<T>> {
Map<T,RWLong> map;
Comparator<T> comparator;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/G7CollationTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/G7CollationTest.java
index 0c813fa..c807fdd 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/G7CollationTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/G7CollationTest.java
@@ -23,7 +23,9 @@
import android.icu.text.CollationKey;
import android.icu.text.Collator;
import android.icu.text.RuleBasedCollator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class G7CollationTest extends TestFmwk{
private static String[] testCases = {
"blackbirds", "Pat", "p\u00E9ch\u00E9", "p\u00EAche", "p\u00E9cher",
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/LotusCollationKoreanTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/LotusCollationKoreanTest.java
index 8cfbfda..c8f10ec 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/LotusCollationKoreanTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/LotusCollationKoreanTest.java
@@ -23,7 +23,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.CollationKey;
import android.icu.text.Collator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class LotusCollationKoreanTest extends TestFmwk{
private static char[][] testSourceCases = {
{0xac00}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/TestComparator.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/TestComparator.java
index 0aee967..87784b7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/TestComparator.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/TestComparator.java
@@ -15,7 +15,9 @@
import org.junit.Ignore;
import org.junit.Test;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestComparator {
// TODO(junit): apparently orphaned - added dummy test to pass ant junit
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/collator/UCAConformanceTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/collator/UCAConformanceTest.java
index e450ca5..b719638 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/collator/UCAConformanceTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/collator/UCAConformanceTest.java
@@ -29,7 +29,9 @@
import android.icu.text.UTF16;
import android.icu.util.ULocale;
import android.icu.util.VersionInfo;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class UCAConformanceTest extends TestFmwk {
public UCAConformanceTest() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/compression/DecompressionTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/compression/DecompressionTest.java
index f1d5676..ae4c810 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/compression/DecompressionTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/compression/DecompressionTest.java
@@ -13,7 +13,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.UnicodeDecompressor;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class DecompressionTest extends TestFmwk {
/** Print out a segment of a character array, if in verbose mode */
private void log(char [] chars, int start, int count) {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/compression/ExhaustiveTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/compression/ExhaustiveTest.java
index 6cf7310..9380bac 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/compression/ExhaustiveTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/compression/ExhaustiveTest.java
@@ -14,7 +14,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.UnicodeCompressor;
import android.icu.text.UnicodeDecompressor;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class ExhaustiveTest extends TestFmwk {
/** Test simple compress/decompress API, returning # of errors */
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/DataReadWriteTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/DataReadWriteTest.java
index 833af44..7ff7211 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/DataReadWriteTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/DataReadWriteTest.java
@@ -20,7 +20,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.impl.duration.impl.XMLRecordReader;
import android.icu.impl.duration.impl.XMLRecordWriter;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class DataReadWriteTest extends TestFmwk {
// strip line ends and trailing spaces
private String normalize(String str) {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/ICUDurationTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/ICUDurationTest.java
index af37dd2..3955990 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/ICUDurationTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/ICUDurationTest.java
@@ -26,11 +26,13 @@
import android.icu.text.DurationFormat;
import android.icu.util.Calendar;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author srl
*
*/
+@MainTestShard
public class ICUDurationTest extends TestFmwk {
/**
* Allows us to not depend on javax.xml.datatype.DatatypeFactory.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/PeriodBuilderFactoryTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/PeriodBuilderFactoryTest.java
index 2743695..d68e2f3 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/PeriodBuilderFactoryTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/PeriodBuilderFactoryTest.java
@@ -21,7 +21,9 @@
import android.icu.impl.duration.PeriodBuilderFactory;
import android.icu.impl.duration.TimeUnit;
import android.icu.impl.duration.TimeUnitConstants;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class PeriodBuilderFactoryTest extends TestFmwk implements TimeUnitConstants {
private PeriodBuilderFactory pbf;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/PeriodTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/PeriodTest.java
index 523f97b..76048ab 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/PeriodTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/PeriodTest.java
@@ -17,7 +17,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.impl.duration.Period;
import android.icu.impl.duration.TimeUnit;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class PeriodTest extends TestFmwk {
@Test
public void testIsSet() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/RegressionTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/RegressionTest.java
index 63dc495..22026a2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/RegressionTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/RegressionTest.java
@@ -18,7 +18,9 @@
import android.icu.impl.duration.PeriodFormatterService;
import android.icu.text.DurationFormat;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class RegressionTest extends TestFmwk {
// bug6397
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/ResourceBasedPeriodFormatterDataServiceTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/ResourceBasedPeriodFormatterDataServiceTest.java
index a45f8ad..33d1691 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/ResourceBasedPeriodFormatterDataServiceTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/ResourceBasedPeriodFormatterDataServiceTest.java
@@ -20,7 +20,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.impl.duration.impl.PeriodFormatterData;
import android.icu.impl.duration.impl.ResourceBasedPeriodFormatterDataService;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class ResourceBasedPeriodFormatterDataServiceTest extends TestFmwk {
@Test
public void testAvailable() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ar_EG.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ar_EG.java
index d70eb89..917bc8d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ar_EG.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ar_EG.java
@@ -13,11 +13,13 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for ar_EG
*/
+@MainTestShard
public class Test_ar_EG extends LanguageTestFmwk {
public Test_ar_EG() {
super("ar_EG", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_en.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_en.java
index 82994f7..13f8e49 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_en.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_en.java
@@ -13,10 +13,12 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for en
*/
+@MainTestShard
public class Test_en extends LanguageTestFmwk {
public Test_en() {
super("en", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_es.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_es.java
index cc33758..7da63a0 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_es.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_es.java
@@ -13,10 +13,12 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for es
*/
+@MainTestShard
public class Test_es extends LanguageTestFmwk {
public Test_es() {
super("es", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_fr.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_fr.java
index 41d7617..90c4700 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_fr.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_fr.java
@@ -13,10 +13,12 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for fr
*/
+@MainTestShard
public class Test_fr extends LanguageTestFmwk {
public Test_fr() {
super("fr", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_he_IL.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_he_IL.java
index 093ebae..83eb84b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_he_IL.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_he_IL.java
@@ -13,11 +13,13 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for he_IL
*/
+@MainTestShard
public class Test_he_IL extends LanguageTestFmwk {
public Test_he_IL() {
super("he_IL", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_hi.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_hi.java
index 3ddd7b4..2289247 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_hi.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_hi.java
@@ -16,10 +16,12 @@
import android.icu.dev.test.duration.LanguageTestFmwk;
import android.icu.impl.duration.TimeUnitConstants;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for hi
*/
+@MainTestShard
public class Test_hi extends LanguageTestFmwk implements TimeUnitConstants {
public Test_hi() {
super("hi", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_it.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_it.java
index 675e1db..443b7e4 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_it.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_it.java
@@ -13,10 +13,12 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for it
*/
+@MainTestShard
public class Test_it extends LanguageTestFmwk {
public Test_it() {
super("it", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ja.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ja.java
index 6b29f1d..c62fa0b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ja.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ja.java
@@ -19,10 +19,12 @@
import android.icu.impl.duration.Period;
import android.icu.impl.duration.PeriodFormatter;
import android.icu.impl.duration.TimeUnitConstants;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for en
*/
+@MainTestShard
public class Test_ja extends LanguageTestFmwk implements TimeUnitConstants {
private BasicPeriodFormatterFactory pff;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ko.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ko.java
index 746b427..1b08f71 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ko.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ko.java
@@ -13,10 +13,12 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for ko
*/
+@MainTestShard
public class Test_ko extends LanguageTestFmwk {
public Test_ko() {
super("ko", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ru.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ru.java
index ab01095..6bfb8cd 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ru.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_ru.java
@@ -13,11 +13,13 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for ru
*/
+@MainTestShard
public class Test_ru extends LanguageTestFmwk {
public Test_ru() {
super("ru", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hans.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hans.java
index 2194141..c493779 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hans.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hans.java
@@ -13,11 +13,13 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for zh_Hans
*/
+@MainTestShard
public class Test_zh_Hans extends LanguageTestFmwk {
public Test_zh_Hans() {
super("zh_Hans", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hans_SG.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hans_SG.java
index 0912df9..0a54e0a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hans_SG.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hans_SG.java
@@ -13,10 +13,12 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for zh_Hans_SG
*/
+@MainTestShard
public class Test_zh_Hans_SG extends LanguageTestFmwk {
public Test_zh_Hans_SG() {
super("zh_Hans_SG", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hant.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hant.java
index 35c204b..42a8188 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hant.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hant.java
@@ -14,11 +14,13 @@
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for zh_Hant
*/
+@MainTestShard
public class Test_zh_Hant extends LanguageTestFmwk {
public Test_zh_Hant() {
super("zh_Hant", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hant_HK.java b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hant_HK.java
index d0f1d14..5e5d62a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hant_HK.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/duration/languages/Test_zh_Hant_HK.java
@@ -13,11 +13,13 @@
package android.icu.dev.test.duration.languages;
import android.icu.dev.test.duration.LanguageTestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for zh_Hant_HK
*/
+@MainTestShard
public class Test_zh_Hant_HK extends LanguageTestFmwk {
public Test_zh_Hant_HK() {
super("zh_Hant_HK", false);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/BigNumberFormatTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/BigNumberFormatTest.java
index 8294469..8398e05 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/BigNumberFormatTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/BigNumberFormatTest.java
@@ -19,11 +19,13 @@
import android.icu.text.DecimalFormat;
import android.icu.text.DecimalFormatSymbols;
import android.icu.text.NumberFormat;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* General test of Big NumberFormat
*/
+@MainTestShard
public class BigNumberFormatTest extends TestFmwk {
static final int ILLEGAL = -1;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/CompactDecimalFormatTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/CompactDecimalFormatTest.java
index f655c19..84bd47c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/CompactDecimalFormatTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/CompactDecimalFormatTest.java
@@ -37,7 +37,9 @@
import android.icu.util.Currency;
import android.icu.util.CurrencyAmount;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CompactDecimalFormatTest extends TestFmwk {
Object[][] EnglishTestData = {
// default is 2 digits of accuracy
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenFormatTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenFormatTest.java
index 8bbd8aa..2755bcc 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenFormatTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenFormatTest.java
@@ -34,12 +34,14 @@
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
+import android.icu.testsharding.MainTestShard;
/**
* @author srl
* @author sgill
*
*/
+@MainTestShard
@RunWith(JUnitParamsRunner.class)
public class DataDrivenFormatTest extends TestFmwk {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenNumberFormatTestData.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenNumberFormatTestData.java
index d5f0bcd..923bd6a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenNumberFormatTestData.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenNumberFormatTestData.java
@@ -21,6 +21,7 @@
import android.icu.text.NumberFormat;
import android.icu.util.Currency;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* A representation of a single NumberFormat specification test from a data driven test file.
@@ -51,6 +52,7 @@
*
* @author rocketman
*/
+@MainTestShard
public class DataDrivenNumberFormatTestData {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenNumberFormatTestUtility.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenNumberFormatTestUtility.java
index 1d841be..2182004 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenNumberFormatTestUtility.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/DataDrivenNumberFormatTestUtility.java
@@ -19,10 +19,12 @@
import android.icu.dev.test.TestFmwk;
import android.icu.dev.test.TestUtil;
import android.icu.impl.Utility;
+import android.icu.testsharding.MainTestShard;
/**
* A collection of methods to run the data driven number format test suite.
*/
+@MainTestShard
public class DataDrivenNumberFormatTestUtility {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatMiscTests.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatMiscTests.java
index a9e3796..124178e 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatMiscTests.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatMiscTests.java
@@ -24,10 +24,12 @@
import android.icu.text.DateFormatSymbols;
import android.icu.text.SimpleDateFormat;
+import android.icu.testsharding.MainTestShard;
/**
* Performs miscellaneous tests for DateFormat, SimpleDateFormat, DateFormatSymbols
**/
+@MainTestShard
public class DateFormatMiscTests extends android.icu.dev.test.TestFmwk {
/*
* @bug 4097450
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRegressionTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRegressionTest.java
index fa83353..78fd168 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRegressionTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRegressionTest.java
@@ -39,10 +39,12 @@
import android.icu.util.SimpleTimeZone;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Performs regression test for DateFormat
**/
+@MainTestShard
public class DateFormatRegressionTest extends android.icu.dev.test.TestFmwk {
/**
* @bug 4029195
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRegressionTestJ.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRegressionTestJ.java
index 8f5790b..7537b8d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRegressionTestJ.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRegressionTestJ.java
@@ -27,7 +27,9 @@
import android.icu.text.SimpleDateFormat;
import android.icu.util.Calendar;
import android.icu.util.TimeZone;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class DateFormatRegressionTestJ extends android.icu.dev.test.TestFmwk {
private static final String TIME_STRING = "2000/11/17 08:01:00";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRoundTripTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRoundTripTest.java
index bc3710a..478b8c7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRoundTripTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatRoundTripTest.java
@@ -28,10 +28,12 @@
import android.icu.util.Calendar;
import android.icu.util.GregorianCalendar;
import android.icu.util.TimeZone;
+import android.icu.testsharding.MainTestShard;
/**
* Performs round-trip tests for DateFormat
**/
+@MainTestShard
public class DateFormatRoundTripTest extends android.icu.dev.test.TestFmwk {
public boolean INFINITE = false;
public boolean quick = true;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatTest.java
index abaec8f..36af749 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateFormatTest.java
@@ -63,7 +63,9 @@
import android.icu.util.ULocale;
import android.icu.util.UResourceBundle;
import android.icu.util.VersionInfo;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class DateFormatTest extends android.icu.dev.test.TestFmwk {
/**
* Verify that patterns have the correct values and could produce the
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateIntervalFormatTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateIntervalFormatTest.java
index c5c5cb8..f27c0db 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateIntervalFormatTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateIntervalFormatTest.java
@@ -39,7 +39,9 @@
import android.icu.util.Output;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class DateIntervalFormatTest extends android.icu.dev.test.TestFmwk {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateTimeGeneratorTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateTimeGeneratorTest.java
index 0da9a45..c1be2f7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/DateTimeGeneratorTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/DateTimeGeneratorTest.java
@@ -40,7 +40,9 @@
import android.icu.util.SimpleTimeZone;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class DateTimeGeneratorTest extends TestFmwk {
public static boolean GENERATE_TEST_DATA;
static {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/GlobalizationPreferencesTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/GlobalizationPreferencesTest.java
index e331aaf..b9159b2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/GlobalizationPreferencesTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/GlobalizationPreferencesTest.java
@@ -32,9 +32,11 @@
import android.icu.util.JapaneseCalendar;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class GlobalizationPreferencesTest extends TestFmwk {
@Test
public void TestDefault() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormat.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormat.java
index 498a2d4..beb4f97 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormat.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormat.java
@@ -30,7 +30,9 @@
import android.icu.text.DateFormat;
import android.icu.text.SimpleDateFormat;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class IntlTestDateFormat extends android.icu.dev.test.TestFmwk {
// Values in milliseconds (== Date)
private static final long ONESECOND = 1000;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatAPI.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatAPI.java
index af15749..1d497c1 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatAPI.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatAPI.java
@@ -33,7 +33,9 @@
import android.icu.text.NumberFormat;
import android.icu.util.Calendar;
import android.icu.util.TimeZone;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class IntlTestDateFormatAPI extends android.icu.dev.test.TestFmwk
{
// Test that the equals method works correctly.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatAPIC.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatAPIC.java
index 4915e2e..c360736 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatAPIC.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatAPIC.java
@@ -25,12 +25,14 @@
import android.icu.text.DecimalFormat;
import android.icu.text.NumberFormat;
import android.icu.text.SimpleDateFormat;
+import android.icu.testsharding.MainTestShard;
/*
* This is an API test, not a unit test. It doesn't test very many cases, and doesn't
* try to test the full functionality. It just calls each function in the class and
* verifies that it works on a basic level.
*/
+@MainTestShard
public class IntlTestDateFormatAPIC extends android.icu.dev.test.TestFmwk {
/**
* Test hiding of parse() and format() APIs in the Format hierarchy.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatSymbols.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatSymbols.java
index 05ac709..9b1cd6f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatSymbols.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDateFormatSymbols.java
@@ -26,7 +26,9 @@
import android.icu.text.DateFormatSymbols;
import android.icu.util.Calendar;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class IntlTestDateFormatSymbols extends android.icu.dev.test.TestFmwk
{
// Test getMonths
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatAPI.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatAPI.java
index 8ea50d3..1594b96 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatAPI.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatAPI.java
@@ -32,7 +32,9 @@
import android.icu.text.DecimalFormat;
import android.icu.text.DecimalFormatSymbols;
import android.icu.text.NumberFormat;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class IntlTestDecimalFormatAPI extends android.icu.dev.test.TestFmwk
{
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatAPIC.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatAPIC.java
index e9cffff..d261933 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatAPIC.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatAPIC.java
@@ -31,10 +31,12 @@
import android.icu.text.DecimalFormatSymbols;
import android.icu.text.NumberFormat;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
// This is an API test, not a unit test. It doesn't test very many cases, and doesn't
// try to test the full functionality. It just calls each function in the class and
// verifies that it works on a basic level.
+@MainTestShard
public class IntlTestDecimalFormatAPIC extends android.icu.dev.test.TestFmwk {
// This test checks various generic API methods in DecimalFormat to achieve 100% API coverage.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatSymbols.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatSymbols.java
index 0c8beed..d50ffc7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatSymbols.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatSymbols.java
@@ -28,7 +28,9 @@
import android.icu.text.DecimalFormatSymbols;
import android.icu.util.Currency;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class IntlTestDecimalFormatSymbols extends android.icu.dev.test.TestFmwk
{
// Test the API of DecimalFormatSymbols; primarily a simple get/set set.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatSymbolsC.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatSymbolsC.java
index 4cd5571..d694cf4 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatSymbolsC.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestDecimalFormatSymbolsC.java
@@ -22,10 +22,12 @@
import android.icu.text.DecimalFormat;
import android.icu.text.DecimalFormatSymbols;
+import android.icu.testsharding.MainTestShard;
/**
* Tests for DecimalFormatSymbols
**/
+@MainTestShard
public class IntlTestDecimalFormatSymbolsC extends android.icu.dev.test.TestFmwk {
/**
* Test the API of DecimalFormatSymbols; primarily a simple get/set set.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestNumberFormat.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestNumberFormat.java
index bb25478..c669120 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestNumberFormat.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestNumberFormat.java
@@ -22,11 +22,13 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.DecimalFormat;
import android.icu.text.NumberFormat;
+import android.icu.testsharding.MainTestShard;
/**
* This test does round-trip testing (format -> parse -> format -> parse -> etc.) of
* NumberFormat.
*/
+@MainTestShard
public class IntlTestNumberFormat extends android.icu.dev.test.TestFmwk {
public NumberFormat fNumberFormat;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestNumberFormatAPI.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestNumberFormatAPI.java
index 4becdb3..de3566c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestNumberFormatAPI.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestNumberFormatAPI.java
@@ -28,7 +28,9 @@
import android.icu.text.NumberFormat;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class IntlTestNumberFormatAPI extends android.icu.dev.test.TestFmwk
{
// This test checks various generic API methods in DecimalFormat to achieve 100% API coverage.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestSimpleDateFormatAPI.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestSimpleDateFormatAPI.java
index bc2ac3d..eca1b1e 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestSimpleDateFormatAPI.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/IntlTestSimpleDateFormatAPI.java
@@ -31,11 +31,13 @@
import android.icu.text.DateFormatSymbols;
import android.icu.text.SimpleDateFormat;
+import android.icu.testsharding.MainTestShard;
/**
* @test 1.4 98/03/06
* @summary test International Simple Date Format API
*/
+@MainTestShard
public class IntlTestSimpleDateFormatAPI extends android.icu.dev.test.TestFmwk
{
// This test checks various generic API methods in DecimalFormat to achieve 100% API coverage.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java
index 6afb411..7332a7f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/ListFormatterTest.java
@@ -17,7 +17,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.ListFormatter;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class ListFormatterTest extends TestFmwk {
String[] HardcodedTestData = {
"",
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/MeasureUnitTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/MeasureUnitTest.java
index a72a378..fa7ecbb 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/MeasureUnitTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/MeasureUnitTest.java
@@ -45,12 +45,14 @@
import android.icu.util.TimeUnit;
import android.icu.util.TimeUnitAmount;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* See https://sites.google.com/site/icusite/processes/release/tasks/standards?pli=1
* for information on how to update with each new release.
* @author markdavis
*/
+@MainTestShard
public class MeasureUnitTest extends TestFmwk {
static class OrderedPair<F extends Comparable, S extends Comparable> extends Pair<F, S> implements Comparable<OrderedPair<F, S>> {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/MessagePatternUtilTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/MessagePatternUtilTest.java
index 08374a3..d67cec2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/MessagePatternUtilTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/MessagePatternUtilTest.java
@@ -27,11 +27,13 @@
import android.icu.text.MessagePatternUtil.MessageNode;
import android.icu.text.MessagePatternUtil.TextNode;
import android.icu.text.MessagePatternUtil.VariantNode;
+import android.icu.testsharding.MainTestShard;
/**
* Test MessagePatternUtil (MessagePattern-as-tree-of-nodes API)
* by building parallel trees of nodes and verifying that they match.
*/
+@MainTestShard
public final class MessagePatternUtilTest extends android.icu.dev.test.TestFmwk {
// The following nested "Expect..." classes are used to build
// a tree structure parallel to what the MessagePatternUtil class builds.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/MessageRegressionTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/MessageRegressionTest.java
index b973156..0959ad1 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/MessageRegressionTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/MessageRegressionTest.java
@@ -51,7 +51,9 @@
import android.icu.text.MessageFormat;
import android.icu.text.NumberFormat;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class MessageRegressionTest extends android.icu.dev.test.TestFmwk {
/* @bug 4074764
* Null exception when formatting pattern with MessageFormat
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatDataDrivenTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatDataDrivenTest.java
index 64c9b2a..c5dcdeb 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatDataDrivenTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatDataDrivenTest.java
@@ -28,7 +28,9 @@
import android.icu.text.DecimalFormat_ICU58;
import android.icu.util.CurrencyAmount;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class NumberFormatDataDrivenTest {
private static ULocale EN = new ULocale("en");
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRegistrationTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRegistrationTest.java
index 39be71d..705a910 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRegistrationTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRegistrationTest.java
@@ -16,7 +16,9 @@
import android.icu.text.NumberFormat;
import android.icu.text.NumberFormat.SimpleNumberFormatFactory;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class NumberFormatRegistrationTest extends android.icu.dev.test.TestFmwk {
@Test
public void TestRegistration() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRegressionTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRegressionTest.java
index bb5cf4d..0b1fd4d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRegressionTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRegressionTest.java
@@ -31,10 +31,12 @@
import android.icu.text.NumberFormat;
import android.icu.util.Calendar;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Performs regression test for MessageFormat
**/
+@MainTestShard
public class NumberFormatRegressionTest extends android.icu.dev.test.TestFmwk {
/**
* alphaWorks upgrade
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRoundTripTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRoundTripTest.java
index e704d49..4e740df 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRoundTripTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatRoundTripTest.java
@@ -22,10 +22,12 @@
import android.icu.text.DecimalFormat;
import android.icu.text.NumberFormat;
+import android.icu.testsharding.MainTestShard;
/**
* Performs round-trip tests for NumberFormat
**/
+@MainTestShard
public class NumberFormatRoundTripTest extends android.icu.dev.test.TestFmwk {
public double MAX_ERROR = 1e-14;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatSerialTestData.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatSerialTestData.java
index fc3d953..eb105e4 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatSerialTestData.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatSerialTestData.java
@@ -10,6 +10,9 @@
package android.icu.dev.test.format;
+import android.icu.testsharding.MainTestShard;
+
+@MainTestShard
public class NumberFormatSerialTestData {
//NumberFormat.getInstance(Locale.US)
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatSpecificationTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatSpecificationTest.java
index 227847e..82da80a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatSpecificationTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatSpecificationTest.java
@@ -17,11 +17,13 @@
import android.icu.text.NumberFormat;
import android.icu.util.Currency;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author rocketman
*
*/
+@MainTestShard
public class NumberFormatSpecificationTest extends TestFmwk {
@Test
public void TestBasicPatterns() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatTest.java
index 3ec0157..24e4bf8 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberFormatTest.java
@@ -66,7 +66,9 @@
import android.icu.util.Currency.CurrencyUsage;
import android.icu.util.CurrencyAmount;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class NumberFormatTest extends TestFmwk {
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberRegressionTests.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberRegressionTests.java
index 0aea5a2..a6fe8ed 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberRegressionTests.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/NumberRegressionTests.java
@@ -51,7 +51,9 @@
import android.icu.util.GregorianCalendar;
import android.icu.util.ULocale;
import android.icu.util.VersionInfo;
+import android.icu.testsharding.HiMemTestShard;
+@HiMemTestShard
public class NumberRegressionTests extends TestFmwk {
private static final char EURO = '\u20ac';
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralFormatTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralFormatTest.java
index 860826b..74eceac 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralFormatTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralFormatTest.java
@@ -19,11 +19,13 @@
import android.icu.text.CurrencyPluralInfo;
import android.icu.text.PluralFormat;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author tschumann (Tim Schumann)
*
*/
+@MainTestShard
public class PluralFormatTest extends TestFmwk {
private void helperTestRules(String localeIDs, String testPattern, Map<Integer,String> changes) {
String[] locales = Utility.split(localeIDs, ',');
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralFormatUnitTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralFormatUnitTest.java
index 6ff0748..91c372d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralFormatUnitTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralFormatUnitTest.java
@@ -31,11 +31,13 @@
import android.icu.text.PluralRules.PluralType;
import android.icu.text.PluralRules.SampleType;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author tschumann (Tim Schumann)
*
*/
+@MainTestShard
public class PluralFormatUnitTest extends TestFmwk {
@Test
public void TestConstructor() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralRangesTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralRangesTest.java
index d085e0b..e0e8600 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralRangesTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralRangesTest.java
@@ -24,11 +24,13 @@
import android.icu.util.Measure;
import android.icu.util.MeasureUnit;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author markdavis
*
*/
+@MainTestShard
public class PluralRangesTest extends TestFmwk {
@Test
public void TestLocaleData() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralRulesTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralRulesTest.java
index 7502bce..96a3a38 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralRulesTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/PluralRulesTest.java
@@ -51,11 +51,13 @@
import android.icu.text.UFieldPosition;
import android.icu.util.Output;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author dougfelt (Doug Felt)
* @author markdavis (Mark Davis) [for fractional support]
*/
+@MainTestShard
public class PluralRulesTest extends TestFmwk {
PluralRulesFactory factory = PluralRulesFactory.NORMAL;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/RBNFParseTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/RBNFParseTest.java
index 236e7f8..5a1b14d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/RBNFParseTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/RBNFParseTest.java
@@ -16,7 +16,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.RuleBasedNumberFormat;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class RBNFParseTest extends TestFmwk {
@Test
public void TestParse() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfLenientScannerTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfLenientScannerTest.java
index f6f40db..b5091da 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfLenientScannerTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfLenientScannerTest.java
@@ -21,7 +21,9 @@
import android.icu.text.RbnfLenientScannerProvider;
import android.icu.text.RuleBasedNumberFormat;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class RbnfLenientScannerTest extends TestFmwk {
private static final RbnfLenientScannerProvider provider = new RbnfScannerProviderImpl();
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfRoundTripTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfRoundTripTest.java
index 35cda51..75225ba 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfRoundTripTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfRoundTripTest.java
@@ -15,7 +15,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.RuleBasedNumberFormat;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class RbnfRoundTripTest extends TestFmwk {
/**
* Perform an exhaustive round-trip test on the English spellout rules
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfTest.java
index d56eaef..e8c343b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/RbnfTest.java
@@ -24,11 +24,13 @@
import android.icu.text.NumberFormat;
import android.icu.text.RuleBasedNumberFormat;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* This does not test lenient parse mode, since testing the default implementation
* introduces a dependency on collation. See RbnfLenientScannerTest.
*/
+@MainTestShard
public class RbnfTest extends TestFmwk {
static String fracRules =
"%main:\n" +
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/RelativeDateTimeFormatterTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/RelativeDateTimeFormatterTest.java
index 5bb71ec..9bf3d21 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/RelativeDateTimeFormatterTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/RelativeDateTimeFormatterTest.java
@@ -24,7 +24,9 @@
import android.icu.text.RelativeDateTimeFormatter.RelativeUnit;
import android.icu.text.RelativeDateTimeFormatter.Style;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class RelativeDateTimeFormatterTest extends TestFmwk {
@Test
public void TestRelativeDateWithQuantity() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/ScientificNumberFormatterTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/ScientificNumberFormatterTest.java
index ccd5160..6d93734 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/ScientificNumberFormatterTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/ScientificNumberFormatterTest.java
@@ -16,11 +16,13 @@
import android.icu.text.NumberFormat;
import android.icu.text.ScientificNumberFormatter;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author rocketman
*
*/
+@MainTestShard
public class ScientificNumberFormatterTest extends TestFmwk {
@Test
public void TestBasic() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/SelectFormatAPITest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/SelectFormatAPITest.java
index 0ae73ea..6f159d7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/SelectFormatAPITest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/SelectFormatAPITest.java
@@ -17,11 +17,13 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.SelectFormat;
+import android.icu.testsharding.MainTestShard;
/**
* @author kirtig
* This class tests the API functionality of the SelectFormat
*/
+@MainTestShard
public class SelectFormatAPITest extends TestFmwk {
static final String SIMPLE_PATTERN1 = "feminine {feminineVerbValue1} other{otherVerbValue1}";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/SelectFormatUnitTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/SelectFormatUnitTest.java
index 7043df6..ae20166 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/SelectFormatUnitTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/SelectFormatUnitTest.java
@@ -14,11 +14,13 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.SelectFormat;
+import android.icu.testsharding.MainTestShard;
/**
* @author kirtig
* This class does the unit testing for the SelectFormat
*/
+@MainTestShard
public class SelectFormatUnitTest extends TestFmwk {
static final String SIMPLE_PATTERN = "feminine {feminineVerbValue} other{otherVerbValue}";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/TestMessageFormat.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/TestMessageFormat.java
index 38d0872..9970c0b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/TestMessageFormat.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/TestMessageFormat.java
@@ -40,7 +40,9 @@
import android.icu.text.UFormat;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestMessageFormat extends android.icu.dev.test.TestFmwk {
@Test
public void TestBug3()
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeUnitTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeUnitTest.java
index 1e9e426..7eb9a72 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeUnitTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeUnitTest.java
@@ -25,11 +25,13 @@
import android.icu.util.TimeUnit;
import android.icu.util.TimeUnitAmount;
import android.icu.util.ULocale;
+import android.icu.testsharding.HiMemTestShard;
/**
* @author markdavis
*
*/
+@HiMemTestShard
public class TimeUnitTest extends TestFmwk {
@Test
public void Test10219FractionalPlurals() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeZoneFormatTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeZoneFormatTest.java
index 246068c..eb3d4fe 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeZoneFormatTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/TimeZoneFormatTest.java
@@ -50,7 +50,9 @@
import android.icu.util.TimeZone.SystemTimeZoneType;
import android.icu.util.TimeZoneTransition;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TimeZoneFormatTest extends android.icu.dev.test.TestFmwk {
private static boolean JDKTZ = (TimeZone.getDefaultTimeZoneType() == TimeZone.TIMEZONE_JDK);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/format/WriteNumberFormatSerialTestData.java b/android_icu4j/src/main/tests/android/icu/dev/test/format/WriteNumberFormatSerialTestData.java
index 69329f6..fcccc6e 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/format/WriteNumberFormatSerialTestData.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/format/WriteNumberFormatSerialTestData.java
@@ -16,11 +16,13 @@
import java.util.Locale;
import android.icu.text.NumberFormat;
+import android.icu.testsharding.MainTestShard;
/**
* @version 1.0
* @author Ram Viswanadha
*/
+@MainTestShard
public class WriteNumberFormatSerialTestData {
static final String header="/*\n" +
" *******************************************************************************\n"+
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/impl/CacheTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/impl/CacheTest.java
index c0cb273..35fe0c5 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/impl/CacheTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/impl/CacheTest.java
@@ -14,7 +14,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.impl.CacheValue;
import android.icu.impl.CacheValue.Strength;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CacheTest extends TestFmwk {
public CacheTest() {}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/iterator/TestUCharacterIterator.java b/android_icu4j/src/main/tests/android/icu/dev/test/iterator/TestUCharacterIterator.java
index 06fa65c..113e8f2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/iterator/TestUCharacterIterator.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/iterator/TestUCharacterIterator.java
@@ -18,6 +18,7 @@
import android.icu.text.ReplaceableString;
import android.icu.text.UCharacterIterator;
import android.icu.text.UTF16;
+import android.icu.testsharding.MainTestShard;
/**
* @author ram
@@ -27,6 +28,7 @@
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
*/
+@MainTestShard
public class TestUCharacterIterator extends TestFmwk{
// constructor -----------------------------------------------------
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/TestUScript.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/TestUScript.java
index 1deeea5..851103b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/TestUScript.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/TestUScript.java
@@ -21,7 +21,9 @@
import android.icu.lang.UScript.ScriptUsage;
import android.icu.text.UnicodeSet;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestUScript extends TestFmwk {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/TestUScriptRun.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/TestUScriptRun.java
index bba60e9..14e9941 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/TestUScriptRun.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/TestUScriptRun.java
@@ -15,7 +15,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.lang.UScript;
import android.icu.lang.UScriptRun;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestUScriptRun extends TestFmwk
{
public TestUScriptRun()
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCaseTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCaseTest.java
index 731cdb6..4447203 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCaseTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCaseTest.java
@@ -30,6 +30,7 @@
import android.icu.text.RuleBasedBreakIterator;
import android.icu.text.UTF16;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
@@ -38,6 +39,7 @@
* @author Syn Wee Quek
* @since march 14 2002
*/
+@MainTestShard
public final class UCharacterCaseTest extends TestFmwk
{
// constructor -----------------------------------------------------------
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCategoryTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCategoryTest.java
index 4f2defb..f2b22f4 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCategoryTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCategoryTest.java
@@ -12,12 +12,14 @@
import android.icu.dev.test.TestFmwk;
import android.icu.lang.UCharacterCategory;
+import android.icu.testsharding.MainTestShard;
/**
* Testing UCharacterCategory
* @author Syn Wee Quek
* @since April 02 2002
*/
+@MainTestShard
public class UCharacterCategoryTest extends TestFmwk
{
// constructor -----------------------------------------------------------
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCompare.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCompare.java
index f08c21b..360ac30 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCompare.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterCompare.java
@@ -17,6 +17,7 @@
import android.icu.lang.UCharacter;
import android.icu.lang.UCharacterCategory;
+import android.icu.testsharding.MainTestShard;
/**
* A class to compare the difference in methods between java.lang.Character and
@@ -26,6 +27,7 @@
* @see android.icu.lang.UCharacter
*/
+@MainTestShard
public final class UCharacterCompare
{
// private variables ================================================
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterDirectionTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterDirectionTest.java
index 4309323..dca965b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterDirectionTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterDirectionTest.java
@@ -13,12 +13,14 @@
import android.icu.dev.test.TestFmwk;
import android.icu.lang.UCharacterDirection;
+import android.icu.testsharding.MainTestShard;
/**
* Testing UCharacterDirection
* @author Syn Wee Quek
* @since July 22 2002
*/
+@MainTestShard
public class UCharacterDirectionTest extends TestFmwk
{
// constructor -----------------------------------------------------------
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterSurrogateTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterSurrogateTest.java
index d902e3f..6ebcc94 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterSurrogateTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterSurrogateTest.java
@@ -14,10 +14,12 @@
import android.icu.impl.Utility;
import android.icu.lang.UCharacter;
import android.icu.text.UTF16;
+import android.icu.testsharding.MainTestShard;
/**
* Test JDK 1.5 cover APIs.
*/
+@MainTestShard
public final class UCharacterSurrogateTest extends TestFmwk {
@org.junit.Test
public void TestUnicodeBlockForName() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterTest.java
index 8380a9f..5954c99 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterTest.java
@@ -38,6 +38,7 @@
import android.icu.util.ULocale;
import android.icu.util.ValueIterator;
import android.icu.util.VersionInfo;
+import android.icu.testsharding.MainTestShard;
/**
* Testing class for UCharacter
@@ -45,6 +46,7 @@
* @author Syn Wee Quek
* @since nov 04 2000
*/
+@MainTestShard
public final class UCharacterTest extends TestFmwk
{
// private variables =============================================
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterThreadTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterThreadTest.java
index 94e9e32..5db1e53 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterThreadTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UCharacterThreadTest.java
@@ -17,11 +17,13 @@
import android.icu.dev.test.TestFmwk;
import android.icu.lang.UCharacter;
+import android.icu.testsharding.MainTestShard;
/**
* @author aheninger
*
*/
+@MainTestShard
public class UCharacterThreadTest extends TestFmwk {
// constructor -----------------------------------------------------------
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UPropertyAliasesTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UPropertyAliasesTest.java
index c74925c..05e7ade 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UPropertyAliasesTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UPropertyAliasesTest.java
@@ -18,7 +18,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.lang.UCharacter;
import android.icu.lang.UProperty;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class UPropertyAliasesTest extends TestFmwk {
public UPropertyAliasesTest() {}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UTF16Test.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UTF16Test.java
index 54f5120..4be26d0 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UTF16Test.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UTF16Test.java
@@ -19,12 +19,14 @@
import android.icu.text.ReplaceableString;
import android.icu.text.UTF16;
import android.icu.text.UTF16.StringComparator;
+import android.icu.testsharding.MainTestShard;
/**
* Testing class for UTF16
* @author Syn Wee Quek
* @since feb 09 2001
*/
+@MainTestShard
public final class UTF16Test extends TestFmwk
{
// constructor ===================================================
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UnicodeSetStringSpanTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UnicodeSetStringSpanTest.java
index 76c0498..9da4fc0 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UnicodeSetStringSpanTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UnicodeSetStringSpanTest.java
@@ -19,11 +19,13 @@
import android.icu.text.UnicodeSet;
import android.icu.text.UnicodeSet.SpanCondition;
import android.icu.util.OutputInt;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* @summary General test of UnicodeSet string span.
*/
+@MainTestShard
public class UnicodeSetStringSpanTest extends TestFmwk {
// Simple test first, easier to debug.
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UnicodeSetTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UnicodeSetTest.java
index 778b958..eb42293 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/lang/UnicodeSetTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/lang/UnicodeSetTest.java
@@ -47,11 +47,13 @@
import android.icu.text.UnicodeSetSpanner.CountMethod;
import android.icu.text.UnicodeSetSpanner.TrimOption;
import android.icu.util.OutputInt;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* @summary General test of UnicodeSet
*/
+@MainTestShard
public class UnicodeSetTest extends TestFmwk {
static final String NOT = "%%%%";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/BasicTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/BasicTest.java
index 58f05f3..58a6fcf 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/BasicTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/BasicTest.java
@@ -30,8 +30,10 @@
import android.icu.text.UTF16;
import android.icu.text.UnicodeSet;
import android.icu.text.UnicodeSetIterator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class BasicTest extends TestFmwk {
String[][] canonTests = {
// Input Decomposed Composed
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/ConformanceTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/ConformanceTest.java
index 5892a4b..0e5a789 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/ConformanceTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/ConformanceTest.java
@@ -23,7 +23,9 @@
import android.icu.text.Normalizer;
import android.icu.text.UTF16;
import android.icu.text.UnicodeSet;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class ConformanceTest extends TestFmwk {
Normalizer normalizer;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/IntHashtable.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/IntHashtable.java
index 8debae2..f144731 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/IntHashtable.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/IntHashtable.java
@@ -5,6 +5,7 @@
import java.util.HashMap;
import java.util.Map;
+import android.icu.testsharding.MainTestShard;
/**
@@ -17,6 +18,7 @@
* @author Mark Davis
*/
+@MainTestShard
public class IntHashtable {
public IntHashtable (int defaultValue) {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/IntStringHashtable.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/IntStringHashtable.java
index 1645a30..f04be7b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/IntStringHashtable.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/IntStringHashtable.java
@@ -5,6 +5,7 @@
import java.util.HashMap;
import java.util.Map;
+import android.icu.testsharding.MainTestShard;
/**
@@ -17,6 +18,7 @@
* @author Mark Davis
*/
+@MainTestShard
public class IntStringHashtable {
public IntStringHashtable (String defaultValue) {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/LongHashtable.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/LongHashtable.java
index 74f01fb..5125ead 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/LongHashtable.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/LongHashtable.java
@@ -5,6 +5,7 @@
import java.util.HashMap;
import java.util.Map;
+import android.icu.testsharding.MainTestShard;
/**
*******************************************************************************
@@ -16,6 +17,7 @@
* for storing of composition data.
* @author Vladimir Weinstein
*/
+@MainTestShard
public class LongHashtable {
public LongHashtable (int defaultValue) {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizationMonkeyTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizationMonkeyTest.java
index 257e19b..9b898dd 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizationMonkeyTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizationMonkeyTest.java
@@ -19,7 +19,9 @@
import android.icu.lang.UCharacterCategory;
import android.icu.text.Normalizer;
import android.icu.text.UTF16;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class NormalizationMonkeyTest extends TestFmwk {
int loopCount = 100;
int maxCharCount = 20;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizerData.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizerData.java
index ff2c812..e6ca150 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizerData.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizerData.java
@@ -14,6 +14,7 @@
import java.util.BitSet;
import android.icu.dev.test.UTF16Util;
+import android.icu.testsharding.MainTestShard;
/**
* Accesses the Normalization Data used for Forms C and D.<br>
@@ -21,6 +22,7 @@
* Updates for supplementary code points:
* Vladimir Weinstein & Markus Scherer
*/
+@MainTestShard
public class NormalizerData {
// static final String copyright = "Copyright (C) 1998-2003 International Business Machines Corporation and Unicode, Inc.";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizerRegressionTests.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizerRegressionTests.java
index 87cb4f9..f20dfa9 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizerRegressionTests.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/NormalizerRegressionTests.java
@@ -14,7 +14,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.Normalizer;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class NormalizerRegressionTests extends TestFmwk {
@Test
public void TestJB4472() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/TestCanonicalIterator.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/TestCanonicalIterator.java
index ee3d054..b07dd0a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/TestCanonicalIterator.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/TestCanonicalIterator.java
@@ -23,10 +23,12 @@
import android.icu.text.CanonicalIterator;
import android.icu.text.Normalizer;
import android.icu.text.UTF16;
+import android.icu.testsharding.MainTestShard;
// TODO: fit into test framework
+@MainTestShard
public class TestCanonicalIterator extends TestFmwk {
static final boolean SHOW_NAMES = false;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/TestDeprecatedNormalizerAPI.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/TestDeprecatedNormalizerAPI.java
index e2987a7..ae0f9a8 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/TestDeprecatedNormalizerAPI.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/TestDeprecatedNormalizerAPI.java
@@ -18,7 +18,9 @@
import android.icu.text.ComposedCharIter;
import android.icu.text.Normalizer;
import android.icu.text.StringCharacterIterator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestDeprecatedNormalizerAPI extends TestFmwk
{
public TestDeprecatedNormalizerAPI() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UTS46Test.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UTS46Test.java
index 7d74997..3dc00c5 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UTS46Test.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UTS46Test.java
@@ -20,12 +20,14 @@
import android.icu.dev.test.TestFmwk;
import android.icu.impl.Normalizer2Impl.UTF16Plus;
import android.icu.text.IDNA;
+import android.icu.testsharding.MainTestShard;
/**
* UTS #46 (IDNA2008) test.
* @author Markus Scherer
* @since 2010jul10
*/
+@MainTestShard
public class UTS46Test extends TestFmwk {
public UTS46Test() {
int commonOptions=
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UnicodeNormalizer.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UnicodeNormalizer.java
index 4340a43..bf57383 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UnicodeNormalizer.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UnicodeNormalizer.java
@@ -13,6 +13,7 @@
package android.icu.dev.test.normalizer;
import android.icu.dev.test.UTF16Util;
+import android.icu.testsharding.MainTestShard;
/**
* Implements Unicode Normalization Forms C, D, KC, KD.<br>
@@ -21,6 +22,7 @@
* Updates for supplementary code points:
* Vladimir Weinstein & Markus Scherer
*/
+@MainTestShard
public class UnicodeNormalizer {
// static final String copyright = "Copyright (C) 1998-2003 International Business Machines Corporation and Unicode, Inc.";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UnicodeNormalizerConformanceTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UnicodeNormalizerConformanceTest.java
index e25c518..78d931d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UnicodeNormalizerConformanceTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/normalizer/UnicodeNormalizerConformanceTest.java
@@ -20,8 +20,10 @@
import android.icu.dev.test.TestUtil;
import android.icu.text.UTF16;
import android.icu.text.UnicodeSet;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class UnicodeNormalizerConformanceTest extends TestFmwk {
UnicodeNormalizer normalizer_C, normalizer_D, normalizer_KC, normalizer_KD;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/number/AffixPatternUtilsTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/number/AffixPatternUtilsTest.java
index db09c19..54a1b38 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/number/AffixPatternUtilsTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/number/AffixPatternUtilsTest.java
@@ -12,7 +12,9 @@
import android.icu.impl.number.NumberStringBuilder;
import android.icu.text.DecimalFormatSymbols;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class AffixPatternUtilsTest {
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/number/FormatQuantityTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/number/FormatQuantityTest.java
index 6892ab4..0202313 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/number/FormatQuantityTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/number/FormatQuantityTest.java
@@ -23,8 +23,10 @@
import android.icu.impl.number.FormatQuantity4;
import android.icu.impl.number.Properties;
import android.icu.text.CompactDecimalFormat.CompactStyle;
+import android.icu.testsharding.MainTestShard;
/** TODO: This is a temporary name for this class. Suggestions for a better name? */
+@MainTestShard
public class FormatQuantityTest extends TestFmwk {
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/number/NumberStringBuilderTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/number/NumberStringBuilderTest.java
index e0e92dd..e889817 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/number/NumberStringBuilderTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/number/NumberStringBuilderTest.java
@@ -13,8 +13,10 @@
import android.icu.impl.number.NumberStringBuilder;
import android.icu.text.NumberFormat;
+import android.icu.testsharding.MainTestShard;
/** @author sffc */
+@MainTestShard
public class NumberStringBuilderTest {
private static final String[] EXAMPLE_STRINGS = {
"",
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/number/PatternStringTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/number/PatternStringTest.java
index 8fcf155..2273daf 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/number/PatternStringTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/number/PatternStringTest.java
@@ -12,8 +12,10 @@
import android.icu.impl.number.Properties;
import android.icu.text.DecimalFormatSymbols;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/** @author sffc */
+@MainTestShard
public class PatternStringTest {
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/number/PropertiesTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/number/PropertiesTest.java
index 3930009..f6f32a6 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/number/PropertiesTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/number/PropertiesTest.java
@@ -45,7 +45,9 @@
import android.icu.util.Currency.CurrencyUsage;
import android.icu.util.MeasureUnit;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class PropertiesTest {
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/number/RounderTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/number/RounderTest.java
index 08c24e7..61da628 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/number/RounderTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/number/RounderTest.java
@@ -12,7 +12,9 @@
import android.icu.impl.number.Properties;
import android.icu.impl.number.rounders.SignificantDigitsRounder;
import android.icu.text.DecimalFormat.SignificantDigitsMode;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class RounderTest {
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/AbstractBreakIteratorTests.java b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/AbstractBreakIteratorTests.java
index d6c579b..cf13bf8 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/AbstractBreakIteratorTests.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/AbstractBreakIteratorTests.java
@@ -10,11 +10,13 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.BreakIterator;
+import android.icu.testsharding.MainTestShard;
/**
* @author sgill
*
*/
+@MainTestShard
public class AbstractBreakIteratorTests extends TestFmwk {
private class AbstractBreakIterator extends BreakIterator {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorRegTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorRegTest.java
index 0ea156d..651c62d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorRegTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorRegTest.java
@@ -17,7 +17,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.BreakIterator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class BreakIteratorRegTest extends TestFmwk
{
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorRules_en_US_TEST.java b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorRules_en_US_TEST.java
index b74771c..1c8eea7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorRules_en_US_TEST.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorRules_en_US_TEST.java
@@ -10,6 +10,7 @@
package android.icu.dev.test.rbbi;
import java.util.ListResourceBundle;
+import android.icu.testsharding.MainTestShard;
/**
* This resource bundle is included for testing and demonstration purposes only.
@@ -17,6 +18,7 @@
* spaces removed. Once we have good test cases for Thai, we will replace this
* with good resource data (and a good dictionary file) for Thai
*/
+@MainTestShard
public class BreakIteratorRules_en_US_TEST extends ListResourceBundle {
private static final String DATA_NAME = "/android/icu/dev/data/rbbi/english.dict";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorTest.java
index 8b53770..177634f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/BreakIteratorTest.java
@@ -21,7 +21,9 @@
import android.icu.text.BreakIterator;
import android.icu.text.FilteredBreakIteratorBuilder;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class BreakIteratorTest extends TestFmwk
{
private BreakIterator characterBreak;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBIAPITest.java b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBIAPITest.java
index aed9cf2..d7aaffd 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBIAPITest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBIAPITest.java
@@ -27,10 +27,12 @@
import android.icu.text.BreakIterator;
import android.icu.text.RuleBasedBreakIterator;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* API Test the RuleBasedBreakIterator class
*/
+@MainTestShard
public class RBBIAPITest extends android.icu.dev.test.TestFmwk {
/**
* Tests clone() and equals() methods of RuleBasedBreakIterator
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITest.java b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITest.java
index e01046c..1d68ba9 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITest.java
@@ -27,7 +27,9 @@
import android.icu.text.BreakIterator;
import android.icu.text.RuleBasedBreakIterator;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class RBBITest extends TestFmwk {
public RBBITest() {
}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITestExtended.java b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITestExtended.java
index 1b843e6..332c090 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITestExtended.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITestExtended.java
@@ -23,6 +23,7 @@
import android.icu.text.BreakIterator;
import android.icu.text.UTF16;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
@@ -32,6 +33,7 @@
* See the data file for a description of the tests.
*
*/
+@MainTestShard
public class RBBITestExtended extends TestFmwk {
public RBBITestExtended() {
}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITestMonkey.java b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITestMonkey.java
index a010b77..81505b4 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITestMonkey.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/rbbi/RBBITestMonkey.java
@@ -25,6 +25,7 @@
import android.icu.text.RuleBasedBreakIterator;
import android.icu.text.UTF16;
import android.icu.text.UnicodeSet;
+import android.icu.testsharding.MainTestShard;
/**
@@ -37,6 +38,7 @@
* Ported from ICU4C, original code in file source/test/intltest/rbbitst.cpp
*
*/
+@MainTestShard
public class RBBITestMonkey extends TestFmwk {
//
// class RBBIMonkeyKind
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/sample/ModuleTestSample.java b/android_icu4j/src/main/tests/android/icu/dev/test/sample/ModuleTestSample.java
index 94df0fa..d8228f8 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/sample/ModuleTestSample.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/sample/ModuleTestSample.java
@@ -9,8 +9,11 @@
*/
package android.icu.dev.test.sample;
+import android.icu.testsharding.MainTestShard;
+
// TODO(junit) : turned off
+@MainTestShard
public class ModuleTestSample /*extends ModuleTest*/ {
ModuleTestSample(){
//super("com/ibm/icu/dev/data/testdata/", "Test");
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/sample/ModuleTestSampleData.java b/android_icu4j/src/main/tests/android/icu/dev/test/sample/ModuleTestSampleData.java
index b503dd5..c6b96f2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/sample/ModuleTestSampleData.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/sample/ModuleTestSampleData.java
@@ -10,6 +10,7 @@
package android.icu.dev.test.sample;
import java.util.ListResourceBundle;
+import android.icu.testsharding.MainTestShard;
/**
* This is sample data for ModuleTestSample, which is an illustration
@@ -18,6 +19,7 @@
* all data, including numeric and boolean data, to be represented
* by Strings.
*/
+@MainTestShard
public class ModuleTestSampleData extends ListResourceBundle {
public Object[][] getContents() {
return contents;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/search/SearchTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/search/SearchTest.java
index 57982fc..a504c40 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/search/SearchTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/search/SearchTest.java
@@ -39,7 +39,9 @@
import android.icu.text.SearchIterator.ElementComparisonType;
import android.icu.text.StringSearch;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class SearchTest extends TestFmwk {
//inner class
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/serializable/CompatibilityTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/serializable/CompatibilityTest.java
index 12324e8..c009394 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/serializable/CompatibilityTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/serializable/CompatibilityTest.java
@@ -32,11 +32,13 @@
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
+import android.icu.testsharding.MainTestShard;
/**
* @author sgill
* @author emader
*/
+@MainTestShard
@RunWith(JUnitParamsRunner.class)
public class CompatibilityTest extends TestFmwk
{
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/serializable/CoverageTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/serializable/CoverageTest.java
index b7d339d..7daf349 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/serializable/CoverageTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/serializable/CoverageTest.java
@@ -21,12 +21,14 @@
import junitparams.JUnitParamsRunner;
import junitparams.Parameters;
+import android.icu.testsharding.MainTestShard;
/**
* @author sgill
* @author emader
*
*/
+@MainTestShard
@RunWith(JUnitParamsRunner.class)
public class CoverageTest extends TestFmwk {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/serializable/FormatHandler.java b/android_icu4j/src/main/tests/android/icu/dev/test/serializable/FormatHandler.java
index c8ea7f8..107372c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/serializable/FormatHandler.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/serializable/FormatHandler.java
@@ -50,6 +50,7 @@
import android.icu.util.TimeUnitAmount;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author emader
@@ -57,6 +58,7 @@
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
+@MainTestShard
public class FormatHandler
{
/*
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/serializable/SerializableTestUtility.java b/android_icu4j/src/main/tests/android/icu/dev/test/serializable/SerializableTestUtility.java
index c7465af..2252f9b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/serializable/SerializableTestUtility.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/serializable/SerializableTestUtility.java
@@ -56,6 +56,7 @@
import android.icu.util.TimeZoneRule;
import android.icu.util.ULocale;
import android.icu.util.VTimeZone;
+import android.icu.testsharding.MainTestShard;
/**
* @author emader
@@ -63,6 +64,7 @@
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
+@MainTestShard
public class SerializableTestUtility {
private static Class serializable;
static {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/serializable/SerializableWriter.java b/android_icu4j/src/main/tests/android/icu/dev/test/serializable/SerializableWriter.java
index 88640e8..e3c2040 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/serializable/SerializableWriter.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/serializable/SerializableWriter.java
@@ -19,6 +19,7 @@
import android.icu.dev.test.serializable.SerializableTestUtility.Handler;
import android.icu.util.TimeZone;
import android.icu.util.VersionInfo;
+import android.icu.testsharding.MainTestShard;
/**
* This class writes the test objects for each class to a file. The work is
@@ -26,6 +27,7 @@
* a CoverageTest w/ a non-null path, which tells it to write the data.
*
*/
+@MainTestShard
public class SerializableWriter
{
String path;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/shaping/ArabicShapingRegTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/shaping/ArabicShapingRegTest.java
index 2e77134..d69125d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/shaping/ArabicShapingRegTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/shaping/ArabicShapingRegTest.java
@@ -18,10 +18,12 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.ArabicShaping;
import android.icu.text.ArabicShapingException;
+import android.icu.testsharding.MainTestShard;
/**
* Regression test for Arabic shaping.
*/
+@MainTestShard
public class ArabicShapingRegTest extends TestFmwk {
/* constants copied from ArabicShaping for convenience */
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/shaping/ArabicShapingTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/shaping/ArabicShapingTest.java
index eeffb3c..d517bcf 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/shaping/ArabicShapingTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/shaping/ArabicShapingTest.java
@@ -15,12 +15,14 @@
import android.icu.text.ArabicShaping;
import android.icu.text.ArabicShapingException;
+import android.icu.testsharding.MainTestShard;
/**
* Interactive test for Arabic shaping.
* Invoke from a command line passing args and strings. Use '-help' to see description of arguments.
*/
// TODO(junit): wasn't running before - needs to be fixed
+@MainTestShard
public class ArabicShapingTest{
private static final int COPY = 0;
private static final int INPLACE = 1;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/IDNAConformanceTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/IDNAConformanceTest.java
index 586c8fa..af93c0a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/IDNAConformanceTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/IDNAConformanceTest.java
@@ -27,11 +27,13 @@
import android.icu.text.IDNA;
import android.icu.text.StringPrepParseException;
import android.icu.text.UTF16;
+import android.icu.testsharding.MainTestShard;
/**
* @author limaoyu
*
*/
+@MainTestShard
public class IDNAConformanceTest extends TestFmwk {
@Test
public void TestConformance() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/IDNAReference.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/IDNAReference.java
index 8fdf624..17fd7c5 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/IDNAReference.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/IDNAReference.java
@@ -11,6 +11,7 @@
import android.icu.text.StringPrepParseException;
import android.icu.text.UCharacterIterator;
+import android.icu.testsharding.MainTestShard;
/**
* @author ram
@@ -18,6 +19,7 @@
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
+@MainTestShard
public class IDNAReference {
private static char[] ACE_PREFIX = new char[]{ 0x0078,0x006E,0x002d,0x002d } ;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/NFS4StringPrep.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/NFS4StringPrep.java
index b99b558..f21aadb 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/NFS4StringPrep.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/NFS4StringPrep.java
@@ -17,6 +17,7 @@
import android.icu.text.StringPrep;
import android.icu.text.StringPrepParseException;
import android.icu.text.UCharacterIterator;
+import android.icu.testsharding.MainTestShard;
/**
* @author ram
@@ -25,6 +26,7 @@
* C code, does not use Object Oriented principles. Quick and Dirty implementation
* for testing.
*/
+@MainTestShard
public final class NFS4StringPrep {
private StringPrep nfscss = null;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/NamePrepTransform.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/NamePrepTransform.java
index e21a09a..f103f72 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/NamePrepTransform.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/NamePrepTransform.java
@@ -19,6 +19,7 @@
import android.icu.text.StringPrepParseException;
import android.icu.text.UCharacterIterator;
import android.icu.text.UnicodeSet;
+import android.icu.testsharding.MainTestShard;
/**
* @author ram
@@ -26,6 +27,7 @@
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
+@MainTestShard
public class NamePrepTransform {
private static final NamePrepTransform transform = new NamePrepTransform();
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/PunycodeReference.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/PunycodeReference.java
index 59ce92d..c917cb7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/PunycodeReference.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/PunycodeReference.java
@@ -32,11 +32,13 @@
import android.icu.text.StringPrepParseException;
import android.icu.text.UCharacterIterator;
import android.icu.text.UTF16;
+import android.icu.testsharding.MainTestShard;
/**
* The implementation is direct port of C code in the RFC
*/
+@MainTestShard
public final class PunycodeReference {
/*** punycode status codes */
public static final int punycode_success=0;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestData.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestData.java
index b0d10d3..8d5041a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestData.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestData.java
@@ -11,6 +11,7 @@
import android.icu.text.IDNA;
import android.icu.text.StringPrepParseException;
+import android.icu.testsharding.MainTestShard;
/**
* @author ram
@@ -18,6 +19,7 @@
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
+@MainTestShard
public class TestData {
public static final char[][] unicodeIn ={
{
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestIDNA.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestIDNA.java
index 1824a59..c9d7165 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestIDNA.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestIDNA.java
@@ -21,10 +21,12 @@
import android.icu.text.StringPrepParseException;
import android.icu.text.UCharacterIterator;
import android.icu.text.UTF16;
+import android.icu.testsharding.MainTestShard;
/**
* @author ram
*/
+@MainTestShard
public class TestIDNA extends TestFmwk {
private StringPrepParseException unassignedException = new StringPrepParseException("",StringPrepParseException.UNASSIGNED_ERROR);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestIDNARef.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestIDNARef.java
index d5512ad..92472bb 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestIDNARef.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestIDNARef.java
@@ -14,6 +14,7 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.StringPrepParseException;
import android.icu.text.UCharacterIterator;
+import android.icu.testsharding.MainTestShard;
/**
* @author ram
@@ -21,6 +22,7 @@
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
+@MainTestShard
public class TestIDNARef extends TestFmwk {
private StringPrepParseException unassignedException = new StringPrepParseException("",StringPrepParseException.UNASSIGNED_ERROR);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestInputDataStructure.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestInputDataStructure.java
index 63618da..091a384 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestInputDataStructure.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestInputDataStructure.java
@@ -13,10 +13,12 @@
import org.junit.Ignore;
import org.junit.Test;
+import android.icu.testsharding.MainTestShard;
/**
* @author limaoyu
*/
+@MainTestShard
public class TestInputDataStructure {
// TODO(junit): not running before - added empty test to keep failures away
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestStringPrep.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestStringPrep.java
index 65e51d2..3a0c1a2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestStringPrep.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestStringPrep.java
@@ -16,11 +16,13 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.StringPrep;
import android.icu.text.StringPrepParseException;
+import android.icu.testsharding.MainTestShard;
/**
* @author ram
*
*/
+@MainTestShard
public class TestStringPrep extends TestFmwk {
/*
There are several special identifiers ("who") which need to be
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestStringPrepProfiles.java b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestStringPrepProfiles.java
index 02c4f49..fa1c432 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestStringPrepProfiles.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/stringprep/TestStringPrepProfiles.java
@@ -14,11 +14,13 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.StringPrep;
import android.icu.text.StringPrepParseException;
+import android.icu.testsharding.MainTestShard;
/**
* @author Michael Ow
*
*/
+@MainTestShard
public class TestStringPrepProfiles extends TestFmwk {
/*
* The format of the test cases should be the following:
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/text/SpoofCheckerTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/text/SpoofCheckerTest.java
index ffb72c4..d1f2b4f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/text/SpoofCheckerTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/text/SpoofCheckerTest.java
@@ -38,7 +38,9 @@
import android.icu.text.SpoofChecker.RestrictionLevel;
import android.icu.text.UnicodeSet;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class SpoofCheckerTest extends TestFmwk {
/*
* Identifiers for verifying that spoof checking is minimally alive and working.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleAPITest.java b/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleAPITest.java
index ad4c250..9bf45be 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleAPITest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleAPITest.java
@@ -16,10 +16,12 @@
import android.icu.dev.test.TestFmwk;
import android.icu.math.BigDecimal;
import android.icu.util.UniversalTimeScale;
+import android.icu.testsharding.MainTestShard;
/**
* Test UniversalTimeScale API
*/
+@MainTestShard
public class TimeScaleAPITest extends TestFmwk
{
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleDataTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleDataTest.java
index 818a3ae..07e4106 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleDataTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleDataTest.java
@@ -21,6 +21,7 @@
import android.icu.util.SimpleTimeZone;
import android.icu.util.TimeZone;
import android.icu.util.UniversalTimeScale;
+import android.icu.testsharding.MainTestShard;
/**
* @author Owner
@@ -28,6 +29,7 @@
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
+@MainTestShard
public class TimeScaleDataTest extends TestFmwk
{
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleMonkeyTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleMonkeyTest.java
index 7c721bd..96d20a0 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleMonkeyTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/timescale/TimeScaleMonkeyTest.java
@@ -18,12 +18,14 @@
import android.icu.dev.test.TestFmwk;
import android.icu.math.BigDecimal;
import android.icu.util.UniversalTimeScale;
+import android.icu.testsharding.MainTestShard;
/**
* This class tests the UniversalTimeScale class by
* generating ramdon values in range and making sure
* that they round-trip correctly.
*/
+@MainTestShard
public class TimeScaleMonkeyTest extends TestFmwk
{
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneAliasTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneAliasTest.java
index eec3bd2..0ec5196 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneAliasTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneAliasTest.java
@@ -29,12 +29,14 @@
import android.icu.dev.test.TestFmwk;
import android.icu.util.TimeZone;
+import android.icu.testsharding.MainTestShard;
/**
* Class for testing TimeZones for consistency
* @author Davis
*
*/
+@MainTestShard
public class TimeZoneAliasTest extends TestFmwk {
/**
* There are two things to check aliases for:<br>
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneBoundaryTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneBoundaryTest.java
index e8bdd17..06806ee 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneBoundaryTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneBoundaryTest.java
@@ -19,11 +19,13 @@
import android.icu.util.Calendar;
import android.icu.util.SimpleTimeZone;
import android.icu.util.TimeZone;
+import android.icu.testsharding.MainTestShard;
/**
* A test which discovers the boundaries of DST programmatically and verifies
* that they are correct.
*/
+@MainTestShard
public class TimeZoneBoundaryTest extends TestFmwk
{
static final int ONE_SECOND = 1000;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneOffsetLocalTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneOffsetLocalTest.java
index 2cc1c3c..e27cc1b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneOffsetLocalTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneOffsetLocalTest.java
@@ -24,10 +24,12 @@
import android.icu.util.RuleBasedTimeZone;
import android.icu.util.SimpleTimeZone;
import android.icu.util.TimeZone;
+import android.icu.testsharding.MainTestShard;
/**
* Testing getOffset APIs using local time
*/
+@MainTestShard
public class TimeZoneOffsetLocalTest extends TestFmwk {
/*
* Testing getOffset APIs around rule transition by local standard/wall time.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneRegressionTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneRegressionTest.java
index f1a21dc..f1f46f9 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneRegressionTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneRegressionTest.java
@@ -34,7 +34,9 @@
import android.icu.util.SimpleTimeZone;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TimeZoneRegressionTest extends TestFmwk {
@Test
public void Test4052967() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneRuleTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneRuleTest.java
index 059fafc..5d83f47 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneRuleTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneRuleTest.java
@@ -35,10 +35,12 @@
import android.icu.util.TimeZoneTransition;
import android.icu.util.ULocale;
import android.icu.util.VTimeZone;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for TimeZoneRule and RuleBasedTimeZone
*/
+@MainTestShard
public class TimeZoneRuleTest extends TestFmwk {
private static final int HOUR = 60 * 60 * 1000;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneTest.java
index be54572..7c7f6b4 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/timezone/TimeZoneTest.java
@@ -43,6 +43,7 @@
import android.icu.util.UResourceBundle;
import android.icu.util.VTimeZone;
import android.icu.util.VersionInfo;
+import android.icu.testsharding.MainTestShard;
/**
* @test 1.22 99/09/21
@@ -50,6 +51,7 @@
* @summary test TimeZone
* @build TimeZoneTest
*/
+@MainTestShard
public class TimeZoneTest extends TestFmwk
{
static final int millisPerHour = 3600000;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/AnyScriptTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/AnyScriptTest.java
index bfffd16..aec7e66 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/AnyScriptTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/AnyScriptTest.java
@@ -18,11 +18,13 @@
import android.icu.text.UnicodeSet;
import android.icu.text.UnicodeSetIterator;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author markdavis
*
*/
+@MainTestShard
public class AnyScriptTest extends TestFmwk {
@Test
public void TestContext() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/CompoundTransliteratorTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/CompoundTransliteratorTest.java
index 7de0d60..18155d6 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/CompoundTransliteratorTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/CompoundTransliteratorTest.java
@@ -14,6 +14,7 @@
import android.icu.impl.Utility;
import android.icu.text.ReplaceableString;
import android.icu.text.Transliterator;
+import android.icu.testsharding.MainTestShard;
@@ -21,6 +22,7 @@
* @test
* @summary General test of CompoundTransliterator
*/
+@MainTestShard
public class CompoundTransliteratorTest extends TestFmwk {
@Test
public void TestConstruction(){
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/ErrorTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/ErrorTest.java
index 50f231d..fe7d6c9 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/ErrorTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/ErrorTest.java
@@ -14,11 +14,13 @@
import android.icu.text.ReplaceableString;
import android.icu.text.Transliterator;
import android.icu.text.UnicodeSet;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* @summary Error condition test of Transliterator
*/
+@MainTestShard
public class ErrorTest extends TestFmwk {
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/JamoTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/JamoTest.java
index dfc711f..76cb9ea 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/JamoTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/JamoTest.java
@@ -17,11 +17,13 @@
import android.icu.dev.test.TestFmwk;
import android.icu.impl.Utility;
import android.icu.text.Transliterator;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* @summary Test the Latin-Jamo transliterator
*/
+@MainTestShard
public class JamoTest extends TestFmwk {
@Test
public void TestJamo() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/RegexUtilitiesTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/RegexUtilitiesTest.java
index 12b9fbb..ebd6d37 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/RegexUtilitiesTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/RegexUtilitiesTest.java
@@ -24,10 +24,12 @@
import android.icu.text.Transliterator;
import android.icu.text.UTF16;
import android.icu.text.UnicodeSet;
+import android.icu.testsharding.MainTestShard;
/**
* @author markdavis
*/
+@MainTestShard
public class RegexUtilitiesTest extends TestFmwk {
/**
* Check basic construction.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/ReplaceableTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/ReplaceableTest.java
index b46e791..8f654b5 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/ReplaceableTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/ReplaceableTest.java
@@ -14,11 +14,13 @@
import android.icu.text.Replaceable;
import android.icu.text.ReplaceableString;
import android.icu.text.Transliterator;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* @summary Round trip test of Transliterator
*/
+@MainTestShard
public class ReplaceableTest extends TestFmwk {
@org.junit.Test
public void Test() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/RoundTripTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/RoundTripTest.java
index a8898fb..83500a8 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/RoundTripTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/RoundTripTest.java
@@ -33,11 +33,13 @@
import android.icu.text.UnicodeSetIterator;
import android.icu.util.LocaleData;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* @summary Round trip test of Transliterator
*/
+@MainTestShard
public class RoundTripTest extends TestFmwk {
//TODO - revisit test cases referencing FIX_ME
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/StringBoilerplateTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/StringBoilerplateTest.java
index d9d4f3f..e67b2fb 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/StringBoilerplateTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/StringBoilerplateTest.java
@@ -14,10 +14,12 @@
import org.junit.Test;
import android.icu.dev.test.TestBoilerplate;
+import android.icu.testsharding.MainTestShard;
/**
* Moved from UnicodeMapTest
*/
+@MainTestShard
public class StringBoilerplateTest extends TestBoilerplate<String> {
public void TestStringBoilerplate() throws Exception {
}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/TestUtility.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/TestUtility.java
index 1c0461f..8014379 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/TestUtility.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/TestUtility.java
@@ -11,7 +11,9 @@
import android.icu.text.UTF16;
import android.icu.text.UnicodeSet;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public final class TestUtility {
public static String hex(char ch) {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/ThreadTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/ThreadTest.java
index 3c20ef9..8cdb093 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/ThreadTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/ThreadTest.java
@@ -15,10 +15,12 @@
import android.icu.dev.test.TestFmwk;
import android.icu.text.Transliterator;
+import android.icu.testsharding.MainTestShard;
// Test for ICU Ticket #7201. With threading bugs in RuleBasedTransliterator, this
// test would reliably crash.
+@MainTestShard
public class ThreadTest extends TestFmwk {
private ArrayList<Worker> threads = new ArrayList<Worker>();
private int iterationCount = 50000;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/TransliteratorTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/TransliteratorTest.java
index 312aedf..fdb0468 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/TransliteratorTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/TransliteratorTest.java
@@ -41,6 +41,7 @@
import android.icu.text.UnicodeSetIterator;
import android.icu.util.CaseInsensitiveString;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/***********************************************************************
@@ -91,6 +92,7 @@
* @test
* @summary General test of Transliterator
*/
+@MainTestShard
public class TransliteratorTest extends TestFmwk {
@Test
public void TestHangul() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeMapBoilerplateTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeMapBoilerplateTest.java
index 629980e..a00e2a1 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeMapBoilerplateTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeMapBoilerplateTest.java
@@ -15,10 +15,12 @@
import android.icu.dev.test.TestBoilerplate;
import android.icu.dev.util.UnicodeMap;
+import android.icu.testsharding.MainTestShard;
/**
* Moved from UnicodeMapTest
*/
+@MainTestShard
public class UnicodeMapBoilerplateTest extends TestBoilerplate<UnicodeMap> {
private static String[] TEST_VALUES = {"A", "B", "C", "D", "E", "F"};
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeMapTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeMapTest.java
index 02aaf09..f0543e2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeMapTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeMapTest.java
@@ -35,11 +35,13 @@
import android.icu.lang.UProperty;
import android.icu.text.UTF16;
import android.icu.text.UnicodeSet;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* @summary General test of UnicodeSet
*/
+@MainTestShard
public class UnicodeMapTest extends TestFmwk {
static final int MODIFY_TEST_LIMIT = 32;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeSetBoilerplateTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeSetBoilerplateTest.java
index 32cbffa..61fead2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeSetBoilerplateTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/UnicodeSetBoilerplateTest.java
@@ -15,10 +15,12 @@
import android.icu.dev.test.TestBoilerplate;
import android.icu.text.UnicodeSet;
+import android.icu.testsharding.MainTestShard;
/**
* Moved from UnicodeMapTest
*/
+@MainTestShard
public class UnicodeSetBoilerplateTest extends TestBoilerplate<UnicodeSet> {
public void TestUnicodeSetBoilerplate() throws Exception {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/translit/WriteCharts.java b/android_icu4j/src/main/tests/android/icu/dev/test/translit/WriteCharts.java
index 01dda9c..200d481 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/translit/WriteCharts.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/translit/WriteCharts.java
@@ -28,7 +28,9 @@
import android.icu.text.UTF16;
import android.icu.text.UnicodeSet;
import android.icu.text.UnicodeSetIterator;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class WriteCharts {
public static void main(String[] args) throws IOException {
if (false) {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/BytesTrieTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/BytesTrieTest.java
index 1251e30..9d31153 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/BytesTrieTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/BytesTrieTest.java
@@ -22,7 +22,9 @@
import android.icu.util.BytesTrie;
import android.icu.util.BytesTrieBuilder;
import android.icu.util.StringTrieBuilder;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class BytesTrieTest extends TestFmwk {
public BytesTrieTest() {}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/CalendarFieldsSet.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/CalendarFieldsSet.java
index 63c802d..404547d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/CalendarFieldsSet.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/CalendarFieldsSet.java
@@ -10,11 +10,13 @@
package android.icu.dev.test.util;
import android.icu.util.Calendar;
+import android.icu.testsharding.MainTestShard;
/**
* @author srl
*
*/
+@MainTestShard
public class CalendarFieldsSet extends FieldsSet {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/CharsTrieTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/CharsTrieTest.java
index c94ca69..032a37f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/CharsTrieTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/CharsTrieTest.java
@@ -23,7 +23,9 @@
import android.icu.util.CharsTrie;
import android.icu.util.CharsTrieBuilder;
import android.icu.util.StringTrieBuilder;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class CharsTrieTest extends TestFmwk {
public CharsTrieTest() {}
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/CompactArrayTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/CompactArrayTest.java
index 6b12834..680082c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/CompactArrayTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/CompactArrayTest.java
@@ -15,10 +15,12 @@
import android.icu.impl.Utility;
import android.icu.util.CompactByteArray;
import android.icu.util.CompactCharArray;
+import android.icu.testsharding.MainTestShard;
/**
* @since release 2.2
*/
+@MainTestShard
public final class CompactArrayTest extends TestFmwk
{
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/CurrencyTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/CurrencyTest.java
index 38bb7d6..8962a43 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/CurrencyTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/CurrencyTest.java
@@ -38,11 +38,13 @@
import android.icu.util.GregorianCalendar;
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* @summary General test of Currency
*/
+@MainTestShard
public class CurrencyTest extends TestFmwk {
/**
* Test of basic API.
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/DateTimeStyleSet.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/DateTimeStyleSet.java
index 9a94b77..d41ad43 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/DateTimeStyleSet.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/DateTimeStyleSet.java
@@ -10,11 +10,13 @@
package android.icu.dev.test.util;
import android.icu.text.DateFormat;
+import android.icu.testsharding.MainTestShard;
/**
* @author srl
*
*/
+@MainTestShard
public class DateTimeStyleSet extends FieldsSet {
private static final int DTS_DATE = 0;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilities.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilities.java
index 6e04975..cab5067 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilities.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilities.java
@@ -9,11 +9,14 @@
*/
package android.icu.dev.test.util;
+import android.icu.testsharding.MainTestShard;
+
/**
* @author srl
*
*/
+@MainTestShard
public class DebugUtilities {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilitiesData.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilitiesData.java
index 6873ef0..b09f26f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilitiesData.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilitiesData.java
@@ -10,6 +10,9 @@
package android.icu.dev.test.util;
+import android.icu.testsharding.MainTestShard;
+
+@MainTestShard
public class DebugUtilitiesData extends Object {
public static final String ICU4C_VERSION="59.1";
public static final int UDebugEnumType = 0;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilitiesTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilitiesTest.java
index 529b385..6d80923 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilitiesTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/DebugUtilitiesTest.java
@@ -12,11 +12,13 @@
import org.junit.Test;
import android.icu.dev.test.TestFmwk;
+import android.icu.testsharding.MainTestShard;
/**
* @author srl
*
*/
+@MainTestShard
public class DebugUtilitiesTest extends TestFmwk {
@Test
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/DisplayNameTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/DisplayNameTest.java
index 9fc485c..06b2335 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/DisplayNameTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/DisplayNameTest.java
@@ -30,9 +30,11 @@
import android.icu.util.TimeZone;
import android.icu.util.ULocale;
import android.icu.util.UResourceBundle;
+import android.icu.testsharding.MainTestShard;
// TODO(junit): test is broken in main branch
+@MainTestShard
public class DisplayNameTest extends TestFmwk {
static final boolean SHOW_ALL = false;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/FieldsSet.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/FieldsSet.java
index 058334c..3043dd1 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/FieldsSet.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/FieldsSet.java
@@ -10,12 +10,14 @@
package android.icu.dev.test.util;
import android.icu.impl.Utility;
+import android.icu.testsharding.MainTestShard;
/**
* @author srl
*
* analog of FieldsSet in C++
*/
+@MainTestShard
public class FieldsSet {
public static final int NO_ENUM = -1;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/GenderInfoTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/GenderInfoTest.java
index dc563ad..f9736db 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/GenderInfoTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/GenderInfoTest.java
@@ -18,7 +18,9 @@
import android.icu.util.GenderInfo;
import android.icu.util.GenderInfo.Gender;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class GenderInfoTest extends TestFmwk {
public static GenderInfo NEUTRAL_LOCALE = GenderInfo.getInstance(ULocale.ENGLISH);
public static GenderInfo MIXED_NEUTRAL_LOCALE = GenderInfo.getInstance(new ULocale("is"));
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUBinaryTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUBinaryTest.java
index 562a136..5d4bde2 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUBinaryTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUBinaryTest.java
@@ -17,6 +17,7 @@
import android.icu.dev.test.TestFmwk;
import android.icu.impl.ICUBinary;
+import android.icu.testsharding.MainTestShard;
/**
* Testing class for Trie. Tests here will be simple, since both CharTrie and
@@ -25,6 +26,7 @@
* @author Syn Wee Quek
* @since release 2.1 Jan 01 2002
*/
+@MainTestShard
public final class ICUBinaryTest extends TestFmwk
{
// constructor ---------------------------------------------------
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUResourceBundleCollationTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUResourceBundleCollationTest.java
index d7d87de..5d77f6c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUResourceBundleCollationTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUResourceBundleCollationTest.java
@@ -19,8 +19,10 @@
import android.icu.text.Collator;
import android.icu.util.ULocale;
import android.icu.util.UResourceBundle;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public final class ICUResourceBundleCollationTest extends TestFmwk {
private static final String COLLATION_RESNAME = "collations";
private static final String COLLATION_KEYWORD = "collation";
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUResourceBundleTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUResourceBundleTest.java
index 147665a..96877ac 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUResourceBundleTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUResourceBundleTest.java
@@ -38,7 +38,9 @@
import android.icu.util.UResourceBundle;
import android.icu.util.UResourceBundleIterator;
import android.icu.util.UResourceTypeMismatchException;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public final class ICUResourceBundleTest extends TestFmwk {
private static final ClassLoader testLoader = ICUResourceBundleTest.class.getClassLoader();
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceTest.java
index 232cc82..00d7975 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceTest.java
@@ -40,7 +40,9 @@
import android.icu.impl.ICUService.SimpleFactory;
import android.icu.impl.LocaleUtility;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class ICUServiceTest extends TestFmwk
{
private String lrmsg(String message, Object lhs, Object rhs) {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceTestSample.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceTestSample.java
index e07d5fa..e36dd1e 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceTestSample.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceTestSample.java
@@ -20,7 +20,9 @@
import android.icu.impl.ICULocaleService;
import android.icu.impl.ICUService;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class ICUServiceTestSample {
static public void main(String[] args) {
new HelloServiceClient();
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceThreadTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceThreadTest.java
index b11b254..8c8a87c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceThreadTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/ICUServiceThreadTest.java
@@ -34,7 +34,9 @@
import android.icu.impl.ICUService.Factory;
import android.icu.impl.ICUService.SimpleFactory;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class ICUServiceThreadTest extends TestFmwk
{
private static final boolean PRINTSTATS = false;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleAliasCollationTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleAliasCollationTest.java
index b07ec51..29d714e 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleAliasCollationTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleAliasCollationTest.java
@@ -17,7 +17,9 @@
import android.icu.text.Collator;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class LocaleAliasCollationTest extends android.icu.dev.test.TestFmwk {
private static final ULocale[][] _LOCALES = {
{new ULocale("en", "RH"), new ULocale("en", "ZW")},
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleAliasTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleAliasTest.java
index fdc4bb0..1c8696b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleAliasTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleAliasTest.java
@@ -26,7 +26,9 @@
import android.icu.util.Calendar;
import android.icu.util.ULocale;
import android.icu.util.UResourceBundle;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class LocaleAliasTest extends TestFmwk {
private static final ULocale[][] _LOCALES = {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleBuilderTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleBuilderTest.java
index 1b3ffca..133e60c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleBuilderTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleBuilderTest.java
@@ -17,10 +17,12 @@
import android.icu.util.IllformedLocaleException;
import android.icu.util.ULocale;
import android.icu.util.ULocale.Builder;
+import android.icu.testsharding.MainTestShard;
/**
* Test cases for ULocale.LocaleBuilder
*/
+@MainTestShard
public class LocaleBuilderTest extends TestFmwk {
@Test
public void TestLocaleBuilder() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleDataTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleDataTest.java
index 5ca9e25..2adbb89 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleDataTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleDataTest.java
@@ -23,6 +23,7 @@
import android.icu.util.ICUException;
import android.icu.util.LocaleData;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author ram
@@ -30,6 +31,7 @@
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
+@MainTestShard
public class LocaleDataTest extends TestFmwk{
private ULocale[] availableLocales = null;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleMatcherShim.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleMatcherShim.java
index cd5c2b3..6a362a3 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleMatcherShim.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleMatcherShim.java
@@ -10,11 +10,13 @@
package android.icu.dev.test.util;
import android.icu.util.LocaleMatcher.LanguageMatcherData;
+import android.icu.testsharding.MainTestShard;
/**
* @author markdavis
*
*/
+@MainTestShard
public class LocaleMatcherShim {
public static LanguageMatcherData load() {
// In CLDR, has different value
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleMatcherTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleMatcherTest.java
index d57ebd2..7acb4b8 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleMatcherTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocaleMatcherTest.java
@@ -23,12 +23,14 @@
import android.icu.util.LocalePriorityList;
import android.icu.util.Output;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Test the LocaleMatcher.
*
* @author markdavis
*/
+@MainTestShard
@SuppressWarnings("deprecation")
public class LocaleMatcherTest extends TestFmwk {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocalePriorityListTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocalePriorityListTest.java
index 2edfe16..17ac80a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/LocalePriorityListTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/LocalePriorityListTest.java
@@ -15,11 +15,13 @@
import android.icu.dev.test.TestFmwk;
import android.icu.util.LocalePriorityList;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Test the LanguagePriorityList
* @author markdavis@google.com
*/
+@MainTestShard
public class LocalePriorityListTest extends TestFmwk {
@Test
public void testLanguagePriorityList() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/RegionTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/RegionTest.java
index 717f465..c223861 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/RegionTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/RegionTest.java
@@ -22,12 +22,14 @@
import android.icu.dev.test.TestFmwk;
import android.icu.util.Region;
import android.icu.util.Region.RegionType;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* @summary General test of Regions
*/
+@MainTestShard
public class RegionTest extends TestFmwk {
String[][] knownRegions = {
// Code , Numeric , Parent, Type, Containing Continent
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/SimpleFormatterTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/SimpleFormatterTest.java
index 1a3ccb7..cf9adc1 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/SimpleFormatterTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/SimpleFormatterTest.java
@@ -15,7 +15,9 @@
import android.icu.text.MessageFormat;
import android.icu.text.SimpleFormatter;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class SimpleFormatterTest extends TestFmwk {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/StringTokenizerTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/StringTokenizerTest.java
index 60c1bde..d0fe32a 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/StringTokenizerTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/StringTokenizerTest.java
@@ -17,12 +17,14 @@
import android.icu.text.ReplaceableString;
import android.icu.text.UnicodeSet;
import android.icu.util.StringTokenizer;
+import android.icu.testsharding.MainTestShard;
/**
* Testing class for StringTokenizer class
* @author Syn Wee Quek
* @since oct 26 2002
*/
+@MainTestShard
public final class StringTokenizerTest extends TestFmwk
{
// constructor ===================================================
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/TestLocaleValidity.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/TestLocaleValidity.java
index 223e316..1aa29d3 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/TestLocaleValidity.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/TestLocaleValidity.java
@@ -28,11 +28,13 @@
import android.icu.impl.locale.LocaleValidityChecker;
import android.icu.impl.locale.LocaleValidityChecker.Where;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* @author markdavis
*
*/
+@MainTestShard
public class TestLocaleValidity extends TestFmwk {
@Test
public void testBasic() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/TestUtilities.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/TestUtilities.java
index c840e1e..d5bac1c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/TestUtilities.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/TestUtilities.java
@@ -18,7 +18,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.dev.util.CollectionUtilities;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TestUtilities extends TestFmwk {
@Test
public void TestCollectionUtilitySpeed() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/TextTrieMapTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/TextTrieMapTest.java
index 61d77ea..646fc8e 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/TextTrieMapTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/TextTrieMapTest.java
@@ -16,7 +16,9 @@
import android.icu.dev.test.TestFmwk;
import android.icu.impl.TextTrieMap;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TextTrieMapTest extends TestFmwk {
private static final Integer SUN = new Integer(1);
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/Trie2Test.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/Trie2Test.java
index be70cc8..aec75d5 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/Trie2Test.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/Trie2Test.java
@@ -25,7 +25,9 @@
import android.icu.impl.Trie2Writable;
import android.icu.impl.Trie2_16;
import android.icu.impl.Trie2_32;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class Trie2Test extends TestFmwk {
/**
* Constructor
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/TrieMapTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/TrieMapTest.java
index a24b275..6db3082 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/TrieMapTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/TrieMapTest.java
@@ -35,7 +35,9 @@
import android.icu.text.UnicodeSet;
import android.icu.util.StringTrieBuilder.Option;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class TrieMapTest extends TestFmwk {
static final boolean SHORT = false;
static final boolean HACK_TO_MAKE_TESTS_PASS = false;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/TrieTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/TrieTest.java
index 50373fb..daffa3f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/TrieTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/TrieTest.java
@@ -21,6 +21,7 @@
import android.icu.impl.TrieIterator;
import android.icu.text.UTF16;
import android.icu.util.RangeValueIterator;
+import android.icu.testsharding.MainTestShard;
/**
* Testing class for Trie. Tests here will be simple, since both CharTrie and
@@ -29,6 +30,7 @@
* @author Syn Wee Quek
* @since release 2.1 Jan 01 2002
*/
+@MainTestShard
public final class TrieTest extends TestFmwk
{
// constructor ---------------------------------------------------
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleCollationTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleCollationTest.java
index 9ffd847..976d739 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleCollationTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleCollationTest.java
@@ -33,7 +33,9 @@
import android.icu.text.LocaleDisplayNames.UiListItem;
import android.icu.util.IllformedLocaleException;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class ULocaleCollationTest extends TestFmwk {
@Test
public void TestCollator() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleTest.java
index 865f112..3d54778 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/ULocaleTest.java
@@ -48,7 +48,9 @@
import android.icu.util.ULocale.Minimize;
import android.icu.util.UResourceBundle;
import android.icu.util.VersionInfo;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class ULocaleTest extends TestFmwk {
// Ticket #8078 and #11674
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/UtilityTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/UtilityTest.java
index e5c640b..fde54c7 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/UtilityTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/UtilityTest.java
@@ -27,11 +27,13 @@
import android.icu.text.UnicodeSet;
import android.icu.util.ByteArrayWrapper;
import android.icu.util.CaseInsensitiveString;
+import android.icu.testsharding.MainTestShard;
/**
* @test
* @summary Test of internal Utility class
*/
+@MainTestShard
public class UtilityTest extends TestFmwk {
@Test
public void TestUnescape() {
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/VersionInfoTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/VersionInfoTest.java
index 8817db9..816be8f 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/VersionInfoTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/VersionInfoTest.java
@@ -18,6 +18,7 @@
import android.icu.dev.test.TestFmwk;
import android.icu.util.VersionInfo;
+import android.icu.testsharding.MainTestShard;
/**
@@ -25,6 +26,7 @@
* @author Syn Wee Quek
* @since release 2.1 March 01 2002
*/
+@MainTestShard
public final class VersionInfoTest extends TestFmwk
{
// constructor ---------------------------------------------------
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/XLocaleDistanceTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/XLocaleDistanceTest.java
index 3afe1fe..fc863b5 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/XLocaleDistanceTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/XLocaleDistanceTest.java
@@ -21,12 +21,14 @@
import android.icu.util.LocaleMatcher;
import android.icu.util.Output;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Test the XLocaleDistance.
*
* @author markdavis
*/
+@MainTestShard
public class XLocaleDistanceTest extends TestFmwk {
private static final boolean REFORMAT = false; // set to true to get a reformatted data file listed
diff --git a/android_icu4j/src/main/tests/android/icu/dev/test/util/XLocaleMatcherTest.java b/android_icu4j/src/main/tests/android/icu/dev/test/util/XLocaleMatcherTest.java
index f21d33e..61dc40b 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/test/util/XLocaleMatcherTest.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/test/util/XLocaleMatcherTest.java
@@ -24,12 +24,14 @@
import android.icu.util.LocalePriorityList;
import android.icu.util.Output;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
/**
* Test the XLocaleMatcher.
*
* @author markdavis
*/
+@MainTestShard
public class XLocaleMatcherTest extends TestFmwk {
private static final boolean REFORMAT = false; // set to true to get a reformatted data file listed
diff --git a/android_icu4j/src/main/tests/android/icu/dev/util/CollectionUtilities.java b/android_icu4j/src/main/tests/android/icu/dev/util/CollectionUtilities.java
index aae830d..2eeaa59 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/util/CollectionUtilities.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/util/CollectionUtilities.java
@@ -23,12 +23,14 @@
import android.icu.text.UTF16;
import android.icu.text.UnicodeSet;
import android.icu.text.UnicodeSetIterator;
+import android.icu.testsharding.MainTestShard;
/**
* Utilities that ought to be on collections, but aren't
*
* @internal CLDR
*/
+@MainTestShard
public final class CollectionUtilities {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/util/ElapsedTimer.java b/android_icu4j/src/main/tests/android/icu/dev/util/ElapsedTimer.java
index edb3a6e..c54fb1d 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/util/ElapsedTimer.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/util/ElapsedTimer.java
@@ -15,6 +15,7 @@
import android.icu.text.MessageFormat;
import android.icu.text.NumberFormat;
import android.icu.text.RuleBasedNumberFormat;
+import android.icu.testsharding.MainTestShard;
/**
@@ -31,6 +32,7 @@
*
* @internal CLDR
*/
+@MainTestShard
public final class ElapsedTimer {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/dev/util/ImmutableEntry.java b/android_icu4j/src/main/tests/android/icu/dev/util/ImmutableEntry.java
index 8cd0727..cfabdae 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/util/ImmutableEntry.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/util/ImmutableEntry.java
@@ -10,11 +10,13 @@
package android.icu.dev.util;
import java.util.Map;
+import android.icu.testsharding.MainTestShard;
/**
* @author markdavis
*
*/
+@MainTestShard
public class ImmutableEntry<K,V> implements Map.Entry<K,V> {
final K k;
final V v;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/util/Timer.java b/android_icu4j/src/main/tests/android/icu/dev/util/Timer.java
index 336edee..86765ba 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/util/Timer.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/util/Timer.java
@@ -12,7 +12,9 @@
import android.icu.text.DecimalFormat;
import android.icu.text.NumberFormat;
import android.icu.util.ULocale;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public final class Timer {
public static final long SECONDS = 100000000;
diff --git a/android_icu4j/src/main/tests/android/icu/dev/util/UnicodeMap.java b/android_icu4j/src/main/tests/android/icu/dev/util/UnicodeMap.java
index 6bb90e3..ea8d430 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/util/UnicodeMap.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/util/UnicodeMap.java
@@ -27,6 +27,7 @@
import android.icu.text.UnicodeSet;
import android.icu.text.UnicodeSetIterator;
import android.icu.util.Freezable;
+import android.icu.testsharding.MainTestShard;
/**
* Class for mapping Unicode characters and strings to values, optimized for single code points,
@@ -41,6 +42,7 @@
* @internal CLDR
*/
+@MainTestShard
public final class UnicodeMap<T> implements Cloneable, Freezable<UnicodeMap<T>>, StringTransform, Iterable<String> {
/**
* For serialization
diff --git a/android_icu4j/src/main/tests/android/icu/dev/util/UnicodeMapIterator.java b/android_icu4j/src/main/tests/android/icu/dev/util/UnicodeMapIterator.java
index 3933b48..a993f3c 100644
--- a/android_icu4j/src/main/tests/android/icu/dev/util/UnicodeMapIterator.java
+++ b/android_icu4j/src/main/tests/android/icu/dev/util/UnicodeMapIterator.java
@@ -13,6 +13,7 @@
import java.util.Set;
import android.icu.text.UTF16;
+import android.icu.testsharding.MainTestShard;
/**
* UnicodeSetIterator iterates over the contents of a UnicodeSet. It
@@ -47,6 +48,7 @@
*
* @internal CLDR
*/
+@MainTestShard
public class UnicodeMapIterator<T> {
/**
diff --git a/android_icu4j/src/main/tests/android/icu/text/DecimalFormat_ICU58.java b/android_icu4j/src/main/tests/android/icu/text/DecimalFormat_ICU58.java
index 425d1ac..a6e4a29 100644
--- a/android_icu4j/src/main/tests/android/icu/text/DecimalFormat_ICU58.java
+++ b/android_icu4j/src/main/tests/android/icu/text/DecimalFormat_ICU58.java
@@ -36,6 +36,7 @@
import android.icu.util.CurrencyAmount;
import android.icu.util.ULocale;
import android.icu.util.ULocale.Category;
+import android.icu.testsharding.MainTestShard;
/**
* {@icuenhanced java.text.DecimalFormat}.{@icu _usage_}
@@ -610,6 +611,7 @@
* @deprecated DecimalFormat was overhauled in ICU 59. This is the old implementation, provided
* temporarily to ease the transition. This class will be removed from ICU 60.
*/
+@MainTestShard
@Deprecated
public class DecimalFormat_ICU58 extends NumberFormat {
diff --git a/android_icu4j/src/main/tests/android/icu/text/DigitList.java b/android_icu4j/src/main/tests/android/icu/text/DigitList.java
index 781ceb3..cc86e2a 100644
--- a/android_icu4j/src/main/tests/android/icu/text/DigitList.java
+++ b/android_icu4j/src/main/tests/android/icu/text/DigitList.java
@@ -10,6 +10,7 @@
package android.icu.text;
import java.math.BigInteger;
+import android.icu.testsharding.MainTestShard;
/**
* <code>DigitList</code> handles the transcoding between numeric values and
@@ -44,6 +45,7 @@
* @version 1.18 08/12/98
* @author Mark Davis, Alan Liu
* */
+@MainTestShard
public final class DigitList {
/**
* The maximum number of significant digits in an IEEE 754 double, that
diff --git a/android_icu4j/src/main/tests/android/icu/text/DigitListTest.java b/android_icu4j/src/main/tests/android/icu/text/DigitListTest.java
index 631deb9..7ec8dd3 100644
--- a/android_icu4j/src/main/tests/android/icu/text/DigitListTest.java
+++ b/android_icu4j/src/main/tests/android/icu/text/DigitListTest.java
@@ -8,8 +8,10 @@
import org.junit.Test;
import android.icu.dev.test.TestFmwk;
+import android.icu.testsharding.MainTestShard;
+@MainTestShard
public class DigitListTest extends TestFmwk {
private static DigitList digitList = new DigitList();
diff --git a/android_icu4j/testing/src/android/icu/testsharding/HiMemTestShard.java b/android_icu4j/testing/src/android/icu/testsharding/HiMemTestShard.java
new file mode 100644
index 0000000..382c0c0
--- /dev/null
+++ b/android_icu4j/testing/src/android/icu/testsharding/HiMemTestShard.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.icu.testsharding;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used for a set of tests that are known to make the heap grow. These tests are run
+ * separately to avoid destabilizing the rest of the tests. See also {@link MainTestShard}.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface HiMemTestShard {}
diff --git a/android_icu4j/testing/src/android/icu/testsharding/MainTestShard.java b/android_icu4j/testing/src/android/icu/testsharding/MainTestShard.java
new file mode 100644
index 0000000..236f046
--- /dev/null
+++ b/android_icu4j/testing/src/android/icu/testsharding/MainTestShard.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.icu.testsharding;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation that indicates a test class is run in the main test process. See also {@link
+ * HiMemTestShard}. It can safely be applied to non-test classes, where it will be ignored.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MainTestShard {}
diff --git a/tools/srcgen/src/main/java/com/android/icu4j/srcgen/Icu4jTestsTransform.java b/tools/srcgen/src/main/java/com/android/icu4j/srcgen/Icu4jTestsTransform.java
index cb08e07..dcdf032 100644
--- a/tools/srcgen/src/main/java/com/android/icu4j/srcgen/Icu4jTestsTransform.java
+++ b/tools/srcgen/src/main/java/com/android/icu4j/srcgen/Icu4jTestsTransform.java
@@ -97,6 +97,9 @@
// Change sample jcite begin / end tags ---XYZ to Androids 'BEGIN(XYZ)' / 'END(XYZ)'
rules.add(createOptionalRule(new TranslateJcite.BeginEndTagsHandler()));
+ // Add annotations to each test file so that they can be sharded across multiple processes.
+ rules.add(createOptionalRule(new ShardingAnnotator()));
+
return rules;
}
}
diff --git a/tools/srcgen/src/main/java/com/android/icu4j/srcgen/ShardingAnnotator.java b/tools/srcgen/src/main/java/com/android/icu4j/srcgen/ShardingAnnotator.java
new file mode 100644
index 0000000..a96cbfb
--- /dev/null
+++ b/tools/srcgen/src/main/java/com/android/icu4j/srcgen/ShardingAnnotator.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.icu4j.srcgen;
+
+import static com.google.currysrc.api.process.ast.PackageMatcher.getPackageName;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Sets;
+import com.google.currysrc.api.process.Context;
+import com.google.currysrc.api.process.Processor;
+
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.text.edits.TextEditGroup;
+
+/**
+ * A {@link Processor} which applies annotations test classes to indicate how they ought to be
+ * sharded. It may also apply annotations to non-test classes in the test package, which will be
+ * ignored (this avoids reproducing the logic to identify test classes).
+ */
+class ShardingAnnotator implements Processor {
+
+ /**
+ * The package in which the annotations to apply live.
+ */
+ private static final String ANNOTATION_PACKAGE = "android.icu.testsharding";
+
+ /**
+ * The simple name of the annotation to apply for test classes not listed in {@link
+ * #CLASS_NAME_TO_ANNOTATION_NAME}.
+ */
+ private static final String DEFAULT_ANNOTATION_NAME = "MainTestShard";
+
+ /**
+ * A map from the fully-qualified names of test classes which need specific annotations to the
+ * simple names of those annotations.
+ */
+ private static final ImmutableMap<String, String> CLASS_NAME_TO_ANNOTATION_NAME =
+ // Keys are in alphabetical order.
+ // All annotations must be included in cts/tests/tests/icu/AndroidTest.xml.
+ ImmutableMap.of(
+ "android.icu.dev.test.format.NumberRegressionTests", "HiMemTestShard",
+ "android.icu.dev.test.format.TimeUnitTest", "HiMemTestShard"
+ );
+
+ @Override
+ public void process(Context context, CompilationUnit cu) {
+ List types = cu.types();
+ ASTRewrite rewrite = context.rewrite();
+ Set<String> imports = Sets.newHashSet();
+ for (Object type : types) {
+ if (type instanceof TypeDeclaration) {
+ TypeDeclaration declaration = (TypeDeclaration) type;
+ if (needsAnnotation(declaration)) {
+ annotateTestType(cu, rewrite, declaration, imports);
+ }
+ }
+ }
+ }
+
+ private boolean needsAnnotation(TypeDeclaration declaration) {
+ int modifiers = declaration.getModifiers();
+ return !declaration.isInterface()
+ && !Modifier.isAbstract(modifiers)
+ && Modifier.isPublic(modifiers);
+ }
+
+ private void annotateTestType(
+ CompilationUnit cu, ASTRewrite rewrite, TypeDeclaration type, Set<String> imports) {
+ AST ast = cu.getAST();
+ String className = getPackageName(type) + '.' + type.getName().getIdentifier();
+ String annotationName = getAnnotationName(className);
+
+ if (!imports.contains(annotationName)) {
+ appendImport(cu, rewrite, annotationName);
+ imports.add(annotationName);
+ }
+
+ MarkerAnnotation annotation = ast.newMarkerAnnotation();
+ annotation.setTypeName(ast.newSimpleName(annotationName));
+ TextEditGroup editGroup = null;
+ rewrite.getListRewrite(type, type.getModifiersProperty())
+ .insertFirst(annotation, editGroup);
+ }
+
+ private String getAnnotationName(String className) {
+ if (CLASS_NAME_TO_ANNOTATION_NAME.containsKey(className)) {
+ return CLASS_NAME_TO_ANNOTATION_NAME.get(className);
+ } else {
+ return DEFAULT_ANNOTATION_NAME;
+ }
+ }
+
+ private void appendImport(CompilationUnit cu, ASTRewrite rewrite, String annotationName) {
+ AST ast = cu.getAST();
+ ImportDeclaration importDeclaration = ast.newImportDeclaration();
+ importDeclaration.setName(ast.newName(ANNOTATION_PACKAGE + '.' + annotationName));
+ TextEditGroup editGroup = null;
+ rewrite.getListRewrite(cu, CompilationUnit.IMPORTS_PROPERTY)
+ .insertLast(importDeclaration, editGroup);
+ }
+
+ @Override
+ public String toString() {
+ return "ShardingAnnotator{}";
+ }
+}