[
https://issues.apache.org/jira/browse/DERBY-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464383
]
Daniel John Debrunner commented on DERBY-64:
--------------------------------------------
A B wrote:
--------------------------------------
I noticed that in the "suite()" method of the JUnit test you use:
+ suite.addTestSuite(CreateTableFromQueryTest.class);
instead of calling the default JUnit decorator, i.e.:
- suite.addTestSuite(CreateTableFromQueryTest.class);
+ suite.addTest(TestConfiguration.defaultSuite(
+ CreateTableFromQueryTest.class));
The latter ensures that the test runs in both embedded mode and client/server
mode, whereas the former (the patch as committed) only runs the test in
embedded mode. I think the general approach has been to try to run JUnit tests
in both modes (by using the "defaultSuite()" method shown above) unless there
is a specific reason to only run the test in one mode.
----------------------------------------
I don't think that's quite correct, a test class's suite method should run the
test in the modes that provide useful testing.
For tests that are testing JDBC features it makes sense to test in both modes
as it tests both JDBC drivers.
However for SQL language tests it doesn't always make sense to test also in the
client mode, since what is being tested is the SQL behaviour of the embedded
engine. For example a test of server side procedures makes little sense to also
run in client mode. I also think that test like this one that are primary DDL
tests have little value in being run in client mode. On the other hand a test
that tests a new data type in the SQL language would make sense to run in the
client mode to ensure that the data value is transfered over DRDA correctly.
It basically comes down to what value would running the test in both
configurations add in terms of quality as opposed to the extra time required to
run the two modes.
This is very very briefly covered in "Primary Configurations" section but could
be expanded.
http://wiki.apache.org/db-derby/DerbyJunitTestConfiguration#head-74a803dbe5c01e00d93dc978dc502c4c17446460
> Create a table with a query
> ---------------------------
>
> Key: DERBY-64
> URL: https://issues.apache.org/jira/browse/DERBY-64
> Project: Derby
> Issue Type: New Feature
> Components: SQL
> Reporter: Christian d'Heureuse
> Assigned To: James F. Adams
> Attachments: Derby64Patch1.txt, Derby64Patch2.txt, Derby64Patch3.txt,
> Derby64Patch4.txt
>
>
> I suggest to implement a SQL statement to create and fill a table with a
> query, without having to write the columns definition.
> e.g.:
> CREATE TABLE new_table AS SELECT ...;
> or:
> SELECT ... INTO new_table FROM ...;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira