Package org.apache.derbyTesting.functionTests.tests.jdbcapi

Examples of org.apache.derbyTesting.functionTests.tests.jdbcapi.AssertEventCatcher.didConnectionClosedEventHappen()


        try {
            conn.getClientInfo("junk");
        } catch (SQLException e) {
                assertSQLState("08003", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
        aes12.resetState();         
        try {
            conn.setClientInfo(null);
        } catch (SQLException e) {
View Full Code Here


        try {
            conn.setClientInfo(null);
        } catch (SQLException e) {
                assertSQLState("08003", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
        aes12.resetState();         
        try {
            conn.setClientInfo("junk1", "junk2");
        } catch (SQLException e) {
View Full Code Here

        try {
            conn.setClientInfo("junk1", "junk2");
        } catch (SQLException e) {
                assertSQLState("08003", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
        aes12.resetState();         
        try {
            conn.isWrapperFor(this.getClass());
        } catch (SQLException e) {
View Full Code Here

        try {
            conn.isWrapperFor(this.getClass());
        } catch (SQLException e) {
                assertSQLState("08003", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        if (usingEmbedded())
          assertTrue(aes12.didConnectionErrorEventHappen());
        else
          //We do not make any call on underneath JDBC Connection
          //object for isWrapperFor and hence never get Connection
View Full Code Here

              //closed exception. Instead we got exception because
              //client driver code is trying to unwrap this.getClass
              //and it can't do that
                assertSQLState("XJ128", e);
        }
      assertFalse(aes12.didConnectionClosedEventHappen());
        if (usingEmbedded())
          assertTrue(aes12.didConnectionErrorEventHappen());
        else
          //We do not make any call on underneath JDBC Connection
          //object for isWrapperFor and hence never get Connection
View Full Code Here

            conn.isValid(5);
        } catch (SQLException e) {
            assertSQLState("08003", e);
        }
        if (usingEmbedded())
          assertTrue(aes12.didConnectionClosedEventHappen());
        else
          assertFalse(aes12.didConnectionClosedEventHappen());
      //As per the JDBC definition, an exception and hence an event is raised
      //for isValid only if the param value is illegal
      assertFalse(aes12.didConnectionErrorEventHappen());
View Full Code Here

            assertSQLState("08003", e);
        }
        if (usingEmbedded())
          assertTrue(aes12.didConnectionClosedEventHappen());
        else
          assertFalse(aes12.didConnectionClosedEventHappen());
      //As per the JDBC definition, an exception and hence an event is raised
      //for isValid only if the param value is illegal
      assertFalse(aes12.didConnectionErrorEventHappen());
        aes12.resetState();         
        if (usingEmbedded())
View Full Code Here

        Connection conn = pc.getConnection();
       
        dropTable(conn, "TAB1");

        //No event should have been generated at this point
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertFalse(aes12.didConnectionErrorEventHappen());
        aes12.resetState();
        //Shutdown the Derby engine or Network Server depending on what
        //mode we are running in.
        if (usingEmbedded())
View Full Code Here

            if (usingEmbedded())
                assertSQLState("08003", e);
            else
                assertSQLState("08006", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
        aes12.resetState();         
        try {
            conn.createClob();
        } catch (SQLException e) {
View Full Code Here

        try {
            conn.createClob();
        } catch (SQLException e) {
                assertSQLState("08003", e);
        }
        assertFalse(aes12.didConnectionClosedEventHappen());
        assertTrue(aes12.didConnectionErrorEventHappen());
        aes12.resetState();         
        try {
            conn.getClientInfo();
        } catch (SQLException e) {
View Full Code Here

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.