Derby
  1. Derby
  2. DERBY-2968

convert lang/renameTable.sql to JUnit

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.4.1.3
    • Component/s: Test
    • Labels:
      None
    1. DERBY-2968.p3
      21 kB
      Ravinder Reddy
    2. DERBY-2968.diff.final
      20 kB
      Ravinder Reddy
    3. DERBY-2968.diff
      18 kB
      Ravinder Reddy

      Activity

      Hide
      Ravinder Reddy added a comment -

      The patch is not ready for commit.
      The test was successfully run on eclipse upon commenting two test cases.I will post the code for the 2 cases in my next comment.
      any comments/suggestions/critics are highly appreciated.
      P.S: I am on my way to write the comments.
      Thank You.

      Show
      Ravinder Reddy added a comment - The patch is not ready for commit. The test was successfully run on eclipse upon commenting two test cases.I will post the code for the 2 cases in my next comment. any comments/suggestions/critics are highly appreciated. P.S: I am on my way to write the comments. Thank You.
      Hide
      Ravinder Reddy added a comment -

      1)
      public void testRenameOpenCursoredTable() throws SQLException

      { Statement s = createStatement(); assertUpdateCount(s , 0 , "create table t2(c21 int not null primary key)"); assertUpdateCount(s , 1 , "insert into t2 values(21)"); assertUpdateCount(s , 1 , "insert into t2 values(22)"); //s.executeUpdate("get cursor c1 as 'select * from t2'"); //assertStatementError("X0X95" , s , "rename table t2 to fake"); }

      I am getting syntax error in — > get cursor c1 as 'select * from t2' statement.
      plzz help me
      Thank You

      Show
      Ravinder Reddy added a comment - 1) public void testRenameOpenCursoredTable() throws SQLException { Statement s = createStatement(); assertUpdateCount(s , 0 , "create table t2(c21 int not null primary key)"); assertUpdateCount(s , 1 , "insert into t2 values(21)"); assertUpdateCount(s , 1 , "insert into t2 values(22)"); //s.executeUpdate("get cursor c1 as 'select * from t2'"); //assertStatementError("X0X95" , s , "rename table t2 to fake"); } I am getting syntax error in — > get cursor c1 as 'select * from t2' statement. plzz help me Thank You
      Hide
      Ravinder Reddy added a comment -

      I hope it is ready for commit.
      I commented a fixture with it's bug(issue) ID.
      any comments/suggestions/critics are highly appreciated.
      Thank You.

      Show
      Ravinder Reddy added a comment - I hope it is ready for commit. I commented a fixture with it's bug(issue) ID. any comments/suggestions/critics are highly appreciated. Thank You.
      Hide
      Kathey Marsden added a comment -

      I looked at your new test and have the following comments:

      • Can you change the test setup to not have assertions as recommended by Dan.
      • Change the test to have space indentation instead of tabs and fix indentation to be consistent
      • There is a typo, Bug 29994 instead of 2994.
      • The new test needs to be added to lang/_Suite.java so it will run.

      Maybe it would be good to name your patches v1,v2 etc instead of "final", just in case changes are needed.

      Kathey

      Show
      Kathey Marsden added a comment - I looked at your new test and have the following comments: Can you change the test setup to not have assertions as recommended by Dan. Change the test to have space indentation instead of tabs and fix indentation to be consistent There is a typo, Bug 29994 instead of 2994. The new test needs to be added to lang/_Suite.java so it will run. Maybe it would be good to name your patches v1,v2 etc instead of "final", just in case changes are needed. Kathey
      Hide
      Ravinder Reddy added a comment -

      Thank You Kathey for your review/Suggestions.
      Hope I made changes according to your specifications.
      I am not sure about the space indentation issue as I manually indented.
      please let me know if any Other changes are required.
      Thank You.

      Show
      Ravinder Reddy added a comment - Thank You Kathey for your review/Suggestions. Hope I made changes according to your specifications. I am not sure about the space indentation issue as I manually indented. please let me know if any Other changes are required. Thank You.
      Hide
      Kathey Marsden added a comment -

      I had some trouble applying the patch. Was this patch made against the trunk? Anyway I manually merged the changes, reformatted the new test, removed renameTable.sql from derbylang.runall and committed.

      Kathey

      Show
      Kathey Marsden added a comment - I had some trouble applying the patch. Was this patch made against the trunk? Anyway I manually merged the changes, reformatted the new test, removed renameTable.sql from derbylang.runall and committed. Kathey
      Hide
      Myrna van Lunteren added a comment -

      looks like this was committed - 10.4.

      Show
      Myrna van Lunteren added a comment - looks like this was committed - 10.4.

        People

        • Assignee:
          Ravinder Reddy
          Reporter:
          Ravinder Reddy
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development