< prev index next >

test/java/util/ResourceBundle/Control/StressTest.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 /*
  24  * @test
  25  * @bug 5102289
  26  * @summary Stress test for ResourceBundle.getBundle with ResourceBundle.Control.
  27  * @run main/othervm -esa StressTest 2 15

  28  */
  29 
  30 import java.util.*;
  31 import java.util.concurrent.atomic.*;
  32 
  33 // Usage: java StressTest [threadsFactor [duration]]
  34 public class StressTest {
  35     static final Locale ROOT_LOCALE = new Locale("");
  36     static final Random rand = new Random();
  37     static final Locale[] locales = {
  38         Locale.US,
  39         Locale.CHINA,
  40         ROOT_LOCALE,
  41         Locale.JAPAN,
  42         Locale.CANADA,
  43         Locale.KOREA
  44     };
  45     static final String[] expected = {
  46         "U.S.A.",
  47         "China",




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 /*
  24  * @test
  25  * @bug 5102289
  26  * @summary Stress test for ResourceBundle.getBundle with ResourceBundle.Control.
  27  * @run main/othervm -esa StressTest 2 15
  28  * @key randomness
  29  */
  30 
  31 import java.util.*;
  32 import java.util.concurrent.atomic.*;
  33 
  34 // Usage: java StressTest [threadsFactor [duration]]
  35 public class StressTest {
  36     static final Locale ROOT_LOCALE = new Locale("");
  37     static final Random rand = new Random();
  38     static final Locale[] locales = {
  39         Locale.US,
  40         Locale.CHINA,
  41         ROOT_LOCALE,
  42         Locale.JAPAN,
  43         Locale.CANADA,
  44         Locale.KOREA
  45     };
  46     static final String[] expected = {
  47         "U.S.A.",
  48         "China",


< prev index next >