mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 17:24:01 +00:00
ICU-13239 moves to its own file a currently disabled test and re-enable test.
X-SVN-Rev: 40215
This commit is contained in:
parent
03e48a9d54
commit
ad48b2ffd8
2 changed files with 31 additions and 28 deletions
|
@ -241,34 +241,6 @@ public class MeasureUnitTest extends TestFmwk {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @author markdavis
|
||||
*
|
||||
*/
|
||||
// TODO(junit): resolve
|
||||
// public static void main(String[] args) {
|
||||
// //generateConstants(); if (true) return;
|
||||
//
|
||||
// // Ticket #12034 deadlock on multi-threaded static init of MeasureUnit.
|
||||
// // The code below reliably deadlocks with ICU 56.
|
||||
// // The test is here in main() rather than in a test function so it can be made to run
|
||||
// // before anything else.
|
||||
// Thread thread = new Thread() {
|
||||
// @Override
|
||||
// public void run() {
|
||||
// @SuppressWarnings("unused")
|
||||
// Set<String> measureUnitTypes = MeasureUnit.getAvailableTypes();
|
||||
// }
|
||||
// };
|
||||
// thread.start();
|
||||
// @SuppressWarnings("unused")
|
||||
// Currency cur = Currency.getInstance(ULocale.ENGLISH);
|
||||
// try {thread.join();} catch(InterruptedException e) {};
|
||||
// // System.out.println("Done with MeasureUnit thread test.");
|
||||
//
|
||||
// new MeasureUnitTest().run(args);
|
||||
// }
|
||||
|
||||
/*
|
||||
@Test
|
||||
public void testZZZ() {
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html#License
|
||||
|
||||
package com.ibm.icu.dev.test.format;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.ibm.icu.dev.test.TestFmwk;
|
||||
import com.ibm.icu.util.Currency;
|
||||
import com.ibm.icu.util.MeasureUnit;
|
||||
import com.ibm.icu.util.ULocale;
|
||||
|
||||
public class MeasureUnitThreadTest extends TestFmwk {
|
||||
|
||||
@Test
|
||||
public void MUThreadTest() {
|
||||
// Ticket #12034 deadlock on multi-threaded static init of MeasureUnit.
|
||||
// The code below reliably deadlocks with ICU 56.
|
||||
// The test is here in its own file so it can be made to run independent of anything else.
|
||||
Thread thread = new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
MeasureUnit.getAvailableTypes();
|
||||
}
|
||||
};
|
||||
thread.start();
|
||||
Currency.getInstance(ULocale.ENGLISH);
|
||||
try {thread.join();} catch(InterruptedException e) {};
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue