Uploaded image for project: 'Apache Trafodion'
  1. Apache Trafodion
  2. TRAFODION-1280

LP Bug: 1465989 - Check the closed statement object status failed

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Defect Description:

      Close a statement object and check its status again when call Statement.isClosed(), failed.

      Test Environment:

      codes' version: commit 1c7265ab7addcd088151904b9139337a29a52d90

      Test Steps:

      Step 1. Create a statement object via a connection object.

      534 stmt = conn.createStatement();
      535 assertFalse(stmt.isClosed());

      Step 2. Take a simple SQL action via this statement object.

      536 sql = "get schemas";
      537 ret = stmt.execute(sql);

      Step 3. Close this statement object when call Statement.close().

      540 stmt.close();

      Step 4. Check this statement object status again.

      541 assertTrue(stmt.isClosed());

      In the above steps, the step 4 will be failed because of the expected value "true" is opposite of the actual value "false" returned by Statement.isClosed() function, the console output as below,

      -bash-4.1$ java -Dprop=t4prop TestBigColumnSize
      Jun 17, 2015 8:37:11 AM TestBigColumnSize <clinit>
      INFO: ============= START ALL TEST CASES =============

      Exception in thread "main" java.lang.AssertionError
      at org.junit.Assert.fail(Assert.java:86)
      at org.junit.Assert.assertTrue(Assert.java:41)
      at org.junit.Assert.assertTrue(Assert.java:52)
      at TestBigColumnSize.test_ext_2(TestBigColumnSize.java:541)
      at TestBigColumnSize.main(TestBigColumnSize.java:26)
      -bash-4.1$

      BTW, T2 and T4 driver will be both impacted due to this issue.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              yubo YuBo
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: