Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3376

Test case in GrantRevokeDDLTest looks to be accidentally commented out...

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.4.1.3
    • 10.6.1.0
    • Test
    • None
    • Newcomer

    Description

      In lang/GrantRevokeDDLTest.java, beginning at line 8057 (at time of writing), there looks to be a test case that was inadvertently commented out:

      // set connection user1
      //ij(USER3)> – test multiple FKs DERBY-1589?set
      // connection user1drop table user3.rt3drop table
      // user2.rt2drop table user1.rt1create table rt1 (c1 int
      // primary key not null, c2 int)insert into rt1 values
      // (1,1), (2,2)grant references on rt1 to PUBLIC, user2,
      // user3set connection user2 XJ001 occurred at create table
      // rt2...create table rt2 (c1 int primary key not null,
      // constraint rt2fk foreign key(c1) references
      // user1.rt1)insert into rt2 values (1), (2)grant
      // references on rt2 to PUBLIC, user3set connection
      // user3create table rt3 (c1 int primary key not null,
      // constraint rt3fk1 foreign key(c1) references
      // user1.rt1, constraint rt3fk2 foreign key(c1) references
      // user1.rt2)insert into rt3 values (1), (2)set connection
      // user1 rt3fk1 should get dropped.revoke references on rt1
      // from PUBLICrevoke references on rt1 from user3set
      // connection user2revoke references on rt2 from PUBLIC
      // expect errorinsert into rt2 values (3)set connection
      // user3 expect error, use user3 references privilege,
      // rt3fk2 still in effectinsert into rt3 values (3)set
      // connection user2revoke references on rt2 from user3set
      // connection user3 ok, rt3fk2 should be dropped.insert
      // into rt3 values (3)

      Based on the format of the comment, my guess is that this JUnit test was created using the conversion script attached to DERBY-2151, and that the script somehow messed up the conversion.

      The first line of the comment mentions DERBY-1589, but a) there is a question mark after it, and b) the commit for that issue does not appear to include the aforementioned lines.

      If the test case is supposed to be commented out, then some explanatory comments explaining why might be nice...

      Attachments

        1. restoreTestCase.diff
          4 kB
          Bryan Pendleton

        Issue Links

          Activity

            People

              bryanpendleton Bryan Pendleton
              army A B
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: