ACCESS-72 Implement test cases regarding TRANSFORM query

Review Request #2897 - Created April 18, 2013 and submitted

Johnny Zhang
old-access
0.1
access-72
access
arvind, brock, jarcec, prasadm, shreepadma
test related to privilege TRANSFORM: query include TRANSFORM required privilege transform@server or all@server to work
right now test fail, looks like it doesn't work
  • 2
  • 0
  • 0
  • 0
  • 2
Description From Last Updated
This should be context.close() which will close the statement and connection. If you don't close the context then the connection ... Prasad Mujumdar
same as previous. Prasad Mujumdar
  1. The test scenarios look fine.
    
    The main comment I have is that for positive test cases, we shouldn't call verifyAuthzException(). If this statement fails with auth error then the test should fail. This method is created for negative test where we want to verify that the expected is auth specific.
    
    1. Thanks for review the patch, Prasad!
      Do you mean something like below for positive test case ?
      
      try {
        assertTrue("admin should be able to create view view_1", !statement.execute("CREATE VIEW " + viewName1
            + " (value) AS SELECT value from " + tableName1 + " LIMIT 10"));
      } catch (SQLException e) {
            throw e;
      }
    2. yes. 
      In fact it would be simpler to just call directly without any try/catch. If the statement is expected to pass, then just call is directly. If it throws an assertion then test will be reported as failed with that exception details.
  2. 
      
  1. Looks good.
    Just one suggestion around closing connections.
  2. This should be context.close() which will close the statement and connection. If you don't close the context then the connection and statement references will remains in the context and the cleanup could result into problems.
  3. 
      
Review request changed

Status: Closed (submitted)

Loading...