This discussion is archived
1 Reply Latest reply: Jan 21, 2013 7:34 PM by 986049 RSS

Unit Test Teardown feature not working

986049 Newbie
Currently Being Moderated
It seems the "Table or Row Restore" Teardown Process only works for small tables and unfiltered source tables.

This issue appears to have been around for a while. This post accurately describes the problem:
Unit test Teardown failure

I am using Version 3.2.20.09 Build MAIN-09.87 and can't use the unit test feature because of this issue.

Is there any workaround? How should I go about requesting the issue to be fixed?

Thanks for any replies.
  • 1. Re: Unit Test Teardown feature not working
    986049 Newbie
    Currently Being Moderated
    OK so here is my current workaround:

    Create a standard "Table or Row Copy" Startup Process with a WHERE condition. Take note of the target table e.g. "TMP$MY_PACKAGE.MY_TABLE".

    Add a "User PL/Sql Code" Teardown Process with something like this code:

    -----
    BEGIN
    MERGE INTO MY_TABLE A
    USING "TMP$MY_PACKAGE.MY_TABLE" B
    ON (A.ROWID = B.SRC$ROWID)
    WHEN MATCHED THEN
    UPDATE SET A.COLUMN_1 = B.COLUMN_1; -- List all columns requiring updating
    COMMIT;

    EXECUTE IMMEDIATE 'DROP TABLE "TMP$MY_PACKAGE.MY_TABLE"';
    END;
    -----

    Limitation is that you have to specify all columns to update. Also insert & delete are not catered for, but you could code that in as well.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points