[jira] [Updated] (DERBY-5342) make ScriptTestCase support "ij.showNoCountForSelect" and "ij.showNoConnectionsAtStart"

2013-04-07 Thread Kathey Marsden (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-5342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kathey Marsden updated DERBY-5342:
--

Fix Version/s: 10.8.3.1

> make ScriptTestCase support "ij.showNoCountForSelect" and 
> "ij.showNoConnectionsAtStart"
> ---
>
> Key: DERBY-5342
> URL: https://issues.apache.org/jira/browse/DERBY-5342
> Project: Derby
>  Issue Type: Improvement
>  Components: Test
>Reporter: Houx Zhang
>Assignee: Houx Zhang
>  Labels: gsoc2011
> Fix For: 10.9.1.0, 10.8.3.1
>
> Attachments: 5342-1.patch, 5342-2.patch, 5342-2.stat, 5342-3.patch, 
> 5342-3.stat, 5342-4-test.patch, 5342-5.patch, 5342-5.stat, 
> 5342-6-testing.patch, 5342-7-test.patch, 5342-8.patch, 5342-8.stat
>
>
> Now, ScriptTestCase doesn't support property "ij.showNoConnectionsAtStart" 
> (do nothing for it) and "ij.showNoCountForSelect"(it always works as 
> "ij.showNoCountForSelect" = "flase").
> It will be better if the two properties be supported. To realise this, 
> utilMain.goScript(Connection conn, LocalizedInput in) should be changed. 
> Besides, some subclasses of ScripTestCase will be adapted accordingly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (DERBY-5342) make ScriptTestCase support "ij.showNoCountForSelect" and "ij.showNoConnectionsAtStart"

2011-07-29 Thread Houx Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-5342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Houx Zhang updated DERBY-5342:
--

Attachment: 5342-8.stat
5342-8.patch
5342-7-test.patch

I have posted 5342-7-test.patch to show the problem.

When run tools._Suite, I've got the log below:
sys.setup-showNoCountForSelect=true
--script.setup()---showNoCountForSelect=true
showNoCountForSelect=true
--script.teardown()---showNoCountForSelect=true
sys.teardown-showNoCountForSelect=true
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null

sys.setup-showNoCountForSelect=null
--script.setup()---showNoCountForSelect=null
showNoCountForSelect=false
--script.teardown()---showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null

sys.setup-showNoCountForSelect=null
--script.setup()---showNoCountForSelect=null
showNoCountForSelect=false
--script.teardown()---showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null

sys.setup-showNoCountForSelect=null
--script.setup()---showNoCountForSelect=null
showNoCountForSelect=false
--script.teardown()---showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null
sys.teardown-showNoCountForSelect=null


We can see that, after run IjConnNameTest, "ij.showNoCountForSelect" is set to 
null. In fact, it's removed in SystemPropertyTestSetup.tearDown(). This hits a 
bug in SystemPropertyTestSetup. In SystemPropertyTestSetup.setUp() 
setProperties() is called, a property won't be added into oldValues if the old 
value equals the new one, so the property will be removed in tearDown() later. 

With 5342-8.patch, everything is OK, please check it, thanks!


> make ScriptTestCase support "ij.showNoCountForSelect" and 
> "ij.showNoConnectionsAtStart"
> ---
>
> Key: DERBY-5342
> URL: https://issues.apache.org/jira/browse/DERBY-5342
> Project: Derby
>  Issue Type: Improvement
>  Components: Test
>Reporter: Houx Zhang
>Assignee: Houx Zhang
>  Labels: gsoc2011
> Fix For: 10.9.0.0
>
> Attachments: 5342-1.patch, 5342-2.patch, 5342-2.stat, 5342-3.patch, 
> 5342-3.stat, 5342-4-test.patch, 5342-5.patch, 5342-5.stat, 
> 5342-6-testing.patch, 5342-7-test.patch, 5342-8.patch, 5342-8.stat
>
>
> Now, ScriptTestCase doesn't support property "ij.showNoConnectionsAtStart" 
> (do nothing for it) and "ij.showNoCountForSelect"(it always works as 
> "ij.showNoCountForSelect" = "flase").
> It will be better if the two properties be supported. To realise this, 
> utilMain.goScript(Connection conn, LocalizedInput in) should be changed. 
> Besides, some subclasses of ScripTestCase will be adapted accordingly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (DERBY-5342) make ScriptTestCase support "ij.showNoCountForSelect" and "ij.showNoConnectionsAtStart"

2011-07-28 Thread Houx Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-5342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Houx Zhang updated DERBY-5342:
--

Attachment: 5342-6-testing.patch

In 5342-6-testing.patch, ij3Test sets "ij.showNoConnectionsAtStart" to false, 

props.setProperty("ij.showNoConnectionsAtStart", "false");

but the test still passes, which is not expected. Furthermore, 
utilMain.goScript() show the property is still true.

This is because ScriptTestcase.setUp() run after SystemPropertySetUp.setUp(), 
so the two properties setted in SystemPropertySetUp.setUp() will be covered.

Now, let's return to 5342-3.patch, and to focus on why 
LocalizedAttributeScriptTest and LocalizedDisplayScriptTest  are affected by 
ijConNameTest.





> make ScriptTestCase support "ij.showNoCountForSelect" and 
> "ij.showNoConnectionsAtStart"
> ---
>
> Key: DERBY-5342
> URL: https://issues.apache.org/jira/browse/DERBY-5342
> Project: Derby
>  Issue Type: Improvement
>  Components: Test
>Reporter: Houx Zhang
>Assignee: Houx Zhang
>  Labels: gsoc2011
> Fix For: 10.9.0.0
>
> Attachments: 5342-1.patch, 5342-2.patch, 5342-2.stat, 5342-3.patch, 
> 5342-3.stat, 5342-4-test.patch, 5342-5.patch, 5342-5.stat, 
> 5342-6-testing.patch
>
>
> Now, ScriptTestCase doesn't support property "ij.showNoConnectionsAtStart" 
> (do nothing for it) and "ij.showNoCountForSelect"(it always works as 
> "ij.showNoCountForSelect" = "flase").
> It will be better if the two properties be supported. To realise this, 
> utilMain.goScript(Connection conn, LocalizedInput in) should be changed. 
> Besides, some subclasses of ScripTestCase will be adapted accordingly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (DERBY-5342) make ScriptTestCase support "ij.showNoCountForSelect" and "ij.showNoConnectionsAtStart"

2011-07-27 Thread Houx Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-5342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Houx Zhang updated DERBY-5342:
--

Attachment: 5342-5.stat
5342-5.patch

Yes, Bryan. I agree that it's better to add the properties setting into the 
constructor of ScriptTestCase. It works well just like in 5342-5.patch. Please 
check it.

As to why IjConnNameTest affected other tests, I think it has been resolved in 
the new patch.

> make ScriptTestCase support "ij.showNoCountForSelect" and 
> "ij.showNoConnectionsAtStart"
> ---
>
> Key: DERBY-5342
> URL: https://issues.apache.org/jira/browse/DERBY-5342
> Project: Derby
>  Issue Type: Improvement
>  Components: Test
>Reporter: Houx Zhang
>Assignee: Houx Zhang
>  Labels: gsoc2011
> Attachments: 5342-1.patch, 5342-2.patch, 5342-2.stat, 5342-3.patch, 
> 5342-3.stat, 5342-4-test.patch, 5342-5.patch, 5342-5.stat
>
>
> Now, ScriptTestCase doesn't support property "ij.showNoConnectionsAtStart" 
> (do nothing for it) and "ij.showNoCountForSelect"(it always works as 
> "ij.showNoCountForSelect" = "flase").
> It will be better if the two properties be supported. To realise this, 
> utilMain.goScript(Connection conn, LocalizedInput in) should be changed. 
> Besides, some subclasses of ScripTestCase will be adapted accordingly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (DERBY-5342) make ScriptTestCase support "ij.showNoCountForSelect" and "ij.showNoConnectionsAtStart"

2011-07-26 Thread Houx Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-5342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Houx Zhang updated DERBY-5342:
--

Attachment: 5342-4-test.patch

Hi, Bryan, I have located the problem, but didn't know how to resolve it.

In a complete testing, LocalizedAttributeScriptTest and 
LocalizedDisplayScriptTest failed because of IjConnNameTest. I have added the 
two tests into tools._Suite.suite() to  make the failures reoccur fast.

As shown in 5342-4-test.patch, after IjConnNameTest ran, 
LocalizedAttributeScriptTest and LocalizedDisplayScriptTest   failed just 
because util.getSystemProperty("ij.showNoConnectionsAtStart")  is false in 
utilMain.goScript(). 

Besides, with the patch below, everything runs well:

Index: 
java/testing/org/apache/derbyTesting/functionTests/tests/i18n/LocalizedAttributeScriptTest.java
===
--- 
java/testing/org/apache/derbyTesting/functionTests/tests/i18n/LocalizedAttributeScriptTest.java
 (revision 1149133)
+++ 
java/testing/org/apache/derbyTesting/functionTests/tests/i18n/LocalizedAttributeScriptTest.java
 (working copy)
@@ -106,6 +106,8 @@
 
 uiProps.put("derby.ui.locale","de_DE");
 uiProps.put("derby.ui.codeset","ISO-8859-1");
+uiProps.put("ij.showNoConnectionsAtStart", "true");
+uiProps.put("ij.showNoCountForSelect", "true");
 suite.addTest(new SystemPropertyTestSetup(
 new 
LocalizedAttributeScriptTest("LocalizedConnectionAttribute"), uiProps));
 
Index: 
java/testing/org/apache/derbyTesting/functionTests/tests/i18n/LocalizedDisplayScriptTest.java
===
--- 
java/testing/org/apache/derbyTesting/functionTests/tests/i18n/LocalizedDisplayScriptTest.java
   (revision 1149133)
+++ 
java/testing/org/apache/derbyTesting/functionTests/tests/i18n/LocalizedDisplayScriptTest.java
   (working copy)
@@ -110,6 +110,8 @@
 Properties uiProps = new Properties();
 uiProps.put("derby.ui.locale","es_AR");
 uiProps.put("derby.ui.codeset","EUC_JP");
+uiProps.put("ij.showNoConnectionsAtStart", "true");
+uiProps.put("ij.showNoCountForSelect", "true");
 suite.addTest(new SystemPropertyTestSetup(
 new LocalizedDisplayScriptTest("LocalizedDisplay"), uiProps));
 return getIJConfig(suite);

However, I think this is not the right way to the problem.

Now, I'm strange with why the two properties has been changed after 
IjConnNameTest ran.

> make ScriptTestCase support "ij.showNoCountForSelect" and 
> "ij.showNoConnectionsAtStart"
> ---
>
> Key: DERBY-5342
> URL: https://issues.apache.org/jira/browse/DERBY-5342
> Project: Derby
>  Issue Type: Improvement
>  Components: Test
>Reporter: Houx Zhang
>Assignee: Houx Zhang
>  Labels: gsoc2011
> Attachments: 5342-1.patch, 5342-2.patch, 5342-2.stat, 5342-3.patch, 
> 5342-3.stat, 5342-4-test.patch
>
>
> Now, ScriptTestCase doesn't support property "ij.showNoConnectionsAtStart" 
> (do nothing for it) and "ij.showNoCountForSelect"(it always works as 
> "ij.showNoCountForSelect" = "flase").
> It will be better if the two properties be supported. To realise this, 
> utilMain.goScript(Connection conn, LocalizedInput in) should be changed. 
> Besides, some subclasses of ScripTestCase will be adapted accordingly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (DERBY-5342) make ScriptTestCase support "ij.showNoCountForSelect" and "ij.showNoConnectionsAtStart"

2011-07-22 Thread Houx Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-5342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Houx Zhang updated DERBY-5342:
--

Attachment: 5342-3.stat
5342-3.patch

Hi, Bryan.

I'm sorry for this typographical error.

It should be 
+ijParser.setConnection(connEnv[0], (numConnections > 1));
just like used in utilMain.go().

Please check the new patch, thanks!

> make ScriptTestCase support "ij.showNoCountForSelect" and 
> "ij.showNoConnectionsAtStart"
> ---
>
> Key: DERBY-5342
> URL: https://issues.apache.org/jira/browse/DERBY-5342
> Project: Derby
>  Issue Type: Improvement
>  Components: Test
>Reporter: Houx Zhang
>Assignee: Houx Zhang
>  Labels: gsoc2011
> Attachments: 5342-1.patch, 5342-2.patch, 5342-2.stat, 5342-3.patch, 
> 5342-3.stat
>
>
> Now, ScriptTestCase doesn't support property "ij.showNoConnectionsAtStart" 
> (do nothing for it) and "ij.showNoCountForSelect"(it always works as 
> "ij.showNoCountForSelect" = "flase").
> It will be better if the two properties be supported. To realise this, 
> utilMain.goScript(Connection conn, LocalizedInput in) should be changed. 
> Besides, some subclasses of ScripTestCase will be adapted accordingly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (DERBY-5342) make ScriptTestCase support "ij.showNoCountForSelect" and "ij.showNoConnectionsAtStart"

2011-07-20 Thread Houx Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-5342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Houx Zhang updated DERBY-5342:
--

Issue & fix info: [Patch Available]

> make ScriptTestCase support "ij.showNoCountForSelect" and 
> "ij.showNoConnectionsAtStart"
> ---
>
> Key: DERBY-5342
> URL: https://issues.apache.org/jira/browse/DERBY-5342
> Project: Derby
>  Issue Type: Improvement
>  Components: Test
>Reporter: Houx Zhang
>Assignee: Houx Zhang
>  Labels: gsoc2011
> Attachments: 5342-1.patch, 5342-2.patch, 5342-2.stat
>
>
> Now, ScriptTestCase doesn't support property "ij.showNoConnectionsAtStart" 
> (do nothing for it) and "ij.showNoCountForSelect"(it always works as 
> "ij.showNoCountForSelect" = "flase").
> It will be better if the two properties be supported. To realise this, 
> utilMain.goScript(Connection conn, LocalizedInput in) should be changed. 
> Besides, some subclasses of ScripTestCase will be adapted accordingly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (DERBY-5342) make ScriptTestCase support "ij.showNoCountForSelect" and "ij.showNoConnectionsAtStart"

2011-07-20 Thread Houx Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-5342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Houx Zhang updated DERBY-5342:
--

Attachment: 5342-2.stat
5342-2.patch

In 5342-2.patch, utilMain.goScript() has been changed to support 
"ij.ShowNoCountForSelect" and "ij.showNoConnectionsAtStart". Besides, 
ScriptTestCase is changed:

 super(script, outputEnc);
+BaseTestCase.setSystemProperty("ij.showNoConnectionsAtStart", "true");
+BaseTestCase.setSystemProperty("ij.showNoCountForSelect", "true");
 
 inputEncoding = (inputEnc == null) ? DEFAULT_ENCODING : inputEnc;
 
two properties are set to true to fit the current state of ScrtipTestCase.

With the patch, tools._Suite can pass OK, and other classes affected are tested.

Please check it, thanks!

> make ScriptTestCase support "ij.showNoCountForSelect" and 
> "ij.showNoConnectionsAtStart"
> ---
>
> Key: DERBY-5342
> URL: https://issues.apache.org/jira/browse/DERBY-5342
> Project: Derby
>  Issue Type: Improvement
>  Components: Test
>Reporter: Houx Zhang
>Assignee: Houx Zhang
>  Labels: gsoc2011
> Attachments: 5342-1.patch, 5342-2.patch, 5342-2.stat
>
>
> Now, ScriptTestCase doesn't support property "ij.showNoConnectionsAtStart" 
> (do nothing for it) and "ij.showNoCountForSelect"(it always works as 
> "ij.showNoCountForSelect" = "flase").
> It will be better if the two properties be supported. To realise this, 
> utilMain.goScript(Connection conn, LocalizedInput in) should be changed. 
> Besides, some subclasses of ScripTestCase will be adapted accordingly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (DERBY-5342) make ScriptTestCase support "ij.showNoCountForSelect" and "ij.showNoConnectionsAtStart"

2011-07-19 Thread Houx Zhang (JIRA)

 [ 
https://issues.apache.org/jira/browse/DERBY-5342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Houx Zhang updated DERBY-5342:
--

Attachment: 5342-1.patch

Hi, Bryan.

This project doesn't related to DERBY-5332, as in ij3_app.properties, it says:
# ij3 wants to test an alternate path for driver loading 
# from URL setting along
ij.database=jdbc:derby:wombat;create=true

so I think it's better to make a new subclass of ScriptTestCase than to add it 
in ToolScripts.

In fact, this project relates to "DERBY-5327", in ij5_app.properties, it says:
ij.showNoConnectionsAtStart=false
ij.showNoCountForSelect=false

however, ScriptTestCase doesn't support this two properties. With the two 
properties supporting, ij5.sql is fit to add into ToolScripts.

I have changed utilMain in 5342-1.patch to support the two properties, and 
tested it well, however, I haven't yet to change  the test cases affected by 
it. 

I'm not sure weather you think this project is not neccessary, so I will have a 
break first and get your advice. Thanks!


> make ScriptTestCase support "ij.showNoCountForSelect" and 
> "ij.showNoConnectionsAtStart"
> ---
>
> Key: DERBY-5342
> URL: https://issues.apache.org/jira/browse/DERBY-5342
> Project: Derby
>  Issue Type: Improvement
>  Components: Test
>Reporter: Houx Zhang
>Assignee: Houx Zhang
>  Labels: gsoc2011
> Attachments: 5342-1.patch
>
>
> Now, ScriptTestCase doesn't support property "ij.showNoConnectionsAtStart" 
> (do nothing for it) and "ij.showNoCountForSelect"(it always works as 
> "ij.showNoCountForSelect" = "flase").
> It will be better if the two properties be supported. To realise this, 
> utilMain.goScript(Connection conn, LocalizedInput in) should be changed. 
> Besides, some subclasses of ScripTestCase will be adapted accordingly.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira