[
https://issues.apache.org/jira/browse/DERBY-4187?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Eranda Sooriyabandara updated DERBY-4187:
-----------------------------------------
Attachment: AlterTableTest.diff
Hi Bryan,
I complete the comparing altertable.out and AlterTableTest and I found
some places where they do not match(asserting) but I think most of
them are doesn't wanted to test for alter table
functionalities.Except,
1)
in line 1378 and 1390 in testAlterColumn()
the underlying test was not there. I think they must be there to
confirm that column was renamed and constraint was there after the
renaming.
ij> describe renc_2;
COLUMN_NAME |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
------------------------------------------------------------------------------
C2 |INTEGER |0 |10 |10 |NULL |NULL |NO
ij> show indexes from renc_2;
TABLE_NAME |COLUMN_NAME |NON_U&|TYPE|ASC&|CARDINA&|PAGES
----------------------------------------------------------------------------
RENC_2 |C2 |false |3 |A |NULL |NULL
If you agree with me I can add the asserting test to the test or we
can leave it as it is now.
----------------------------------------------------------------------------------
2)
in line 2019 in testDropColumn() it says that
ij> -- Verify that a GRANTED privilege fails a drop column in RESTRICT mode,
-- and verify that the privilege is dropped in CASCADE mode:
but according to the test I found that
st.executeUpdate("alter table atdc_10 drop column b restrict");
So I change the comment to
// Verify that a GRANTED privilege fails a drop column in
// CASCADE mode, and verify that the privilege is dropped
// in RESTRICT mode:
But here drop column in cascade mode is not tested. Please make a
comment that I am correct or not.
-------------------------------------------------------------------------------------
3)
At line 2461 and 2465 in testJira3355()
st.executeUpdate("create table d3355 ( c1 varchar(10), \"c2\" "
+"varchar(10), c3 varchar(10))");
According to the create table statement there is no column named "C3"
in the table d3355 but it passes as follows
st.executeUpdate("alter table d3355 alter column \"C3\" not null");
st.executeUpdate(" create table \"d3355_a\" ( c1 varchar(10), \"c2\" "
+"varchar(10), c3 varchar(10))");
According to the create table statement there is no column named "C3"
in the table "d3355_a" but it passes as follows
st.executeUpdate("alter table \"d3355_a\" alter column \"C3\" not null");
This is a contradictory behavior as I think.
-----------------------------------------------------------------------------------
Also I add some comment according to the altertable.out as I think its
appropriate.
I have gone through the full code and I didn't see any other mistakes
on the test.
And here I attach the patch file that I updated.
Thanks
Eranda
> Convert altertable.sql to JUnit
> -------------------------------
>
> Key: DERBY-4187
> URL: https://issues.apache.org/jira/browse/DERBY-4187
> Project: Derby
> Issue Type: Test
> Components: Test
> Affects Versions: 10.4.2.1
> Reporter: Eranda Sooriyabandara
> Assignee: Eranda Sooriyabandara
> Priority: Minor
> Fix For: 10.5.1.2
>
> Attachments: AlterTable.diff, AlterTable.java, AlterTableTest.diff,
> AlterTableTest.diff, AlterTableTest.diff, AlterTableTest.diff,
> AlterTableTest.diff, AlterTableTest.diff, AlterTableTest.diff,
> AlterTableTest.diff, AlterTableTest.java, AlterTableTest.java,
> AlterTableTest.java, reformatPatch.diff, removeFromOldSuite.diff, svn_stat.txt
>
> Original Estimate: 486.08h
> Remaining Estimate: 486.08h
>
> Converting altertable.sql harness test to JUnit
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.