MTReadProfileTest.java revision 2362
2644N/A/*
2644N/A * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
2644N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2644N/A *
2644N/A * This code is free software; you can redistribute it and/or modify it
2644N/A * under the terms of the GNU General Public License version 2 only, as
2644N/A * published by the Free Software Foundation.
2644N/A *
2644N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2644N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2644N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2644N/A * version 2 for more details (a copy is included in the LICENSE file that
2644N/A * accompanied this code).
2644N/A *
2644N/A * You should have received a copy of the GNU General Public License version
2644N/A * 2 along with this work; if not, write to the Free Software Foundation,
2644N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2644N/A *
2644N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2644N/A * or visit www.oracle.com if you need additional information or have any
2644N/A * questions.
2644N/A */
2644N/A
2644N/A/**
2644N/A * @test
2644N/A * @bug 6476665
2644N/A * @summary Verifies MT safety of reading profiles of the standard color spaces
2644N/A * @run main MTReadProfileTest
2644N/A */
2644N/A
2644N/Apublic class MTReadProfileTest {
2644N/A public final static int THREAD_COUNT = 30;
2644N/A public static void main(String [] args) throws InterruptedException {
2644N/A Thread [] threads = new Thread[THREAD_COUNT];
2644N/A ReadProfileTest [] tests = new ReadProfileTest[THREAD_COUNT];
2644N/A
2644N/A for (int i = 0; i < THREAD_COUNT; i++) {
2644N/A tests[i] = new ReadProfileTest();
2644N/A threads[i] = new Thread(tests[i]);
2644N/A }
2644N/A for (int i = 0; i < threads.length; i++) {
2644N/A threads[i].start();
2644N/A }
2644N/A for (int i = 0; i < threads.length; i++) {
2644N/A threads[i].join();
2644N/A if (!tests[i].getStatus()) {
2644N/A throw new RuntimeException("Error in MT reading of the ICC " +
2644N/A "profiles");
2644N/A }
2644N/A }
2644N/A }
2644N/A}
2644N/A