Package org.jacorb.test.bugs.bugjac235

Source Code of org.jacorb.test.bugs.bugjac235.HigherPropertyTest

package org.jacorb.test.bugs.bugjac235;

import static org.junit.Assert.fail;
import java.util.Properties;
import org.jacorb.test.harness.ClientServerSetup;
import org.junit.BeforeClass;
import org.junit.Test;

public class HigherPropertyTest extends AbstractTestCase
{
    @BeforeClass
    public static void beforeClassSetUp() throws Exception
    {
        final Properties serverProps = new Properties();
        serverProps.setProperty(PROP_PENDING_REPLY_TIMEOUT, "8000");
        setup = new ClientServerSetup(JAC235Impl.class.getName(), serverProps, serverProps);

    }

    @Test
    public void testTimeout() throws Exception
    {
        setTimeout(2000);

        setServerPolicy();

        // try to invoke the operation this
        // should result in a timeout exception because the server
        // will sleep longer than the timeout (sleep is int msecs.)
        try
        {
            server.hello( 4000 );
            fail ("testTimeout : TIMEOUT exception expected");
        }
        catch ( org.omg.CORBA.TIMEOUT t )
        {
        }

        server.hello(1000);
    }
}
TOP

Related Classes of org.jacorb.test.bugs.bugjac235.HigherPropertyTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.