[
https://issues.apache.org/jira/browse/DERBY-4356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rick Hillegas updated DERBY-4356:
---------------------------------
Attachment: derby-4356-01-aa-noCanary.diff
Attaching derby-4356-01-aa-noCanary.diff. This patch tries to make
ManagementBeanTest defensively insulate itself from artifacts left over from
other tests. The test now runs cleanly both standalone and in a suite in which
a preceding test (ClassLoaderBootTest) leaves some cruft hanging around. I will
run the full regression suite next.
ManagementBeanTest has turned out to be very noisy. This patch attempts to make
the test less sensitive to cruft left over from previous tests. Instead of
expecting a fixed number of MBeans, the test now measures differences in the
number of MBeans produced by the start and stop operations.
Along the way, I discovered how many of each kind of MBean we expect to start
and stop. I coded this information into the assertions. Previously the test
just measured the total number of MBeans.
I hope that these changes make the test
1) More sensitive to facts which it is trying to measure.
2) Less sensitive to facts which it is not trying to measure.
Touches the following file:
M
java/testing/org/apache/derbyTesting/functionTests/tests/management/ManagementMBeanTest.java
> testStartStopManagementFromApplication(org.apache.derbyTesting.functionTests.tests.management.ManagementMBeanTest)junit.framework.AssertionFailedError:
> expected:<2> but was:<%>
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DERBY-4356
> URL: https://issues.apache.org/jira/browse/DERBY-4356
> Project: Derby
> Issue Type: Bug
> Components: JMX, Test
> Affects Versions: 10.4.3.0, 10.5.4.0, 10.6.0.0
> Environment: All
> Reporter: Ole Solberg
> Attachments: derby-4356-01-aa-noCanary.diff, z.diff
>
>
> Seen with svn r805448 on tinderbox/trunk (
> http://dbtg.foundry.sun.com/derby/test/tinderbox_trunk16/jvm1.6/testing/Limited/index.html
> ).
> See e.g.
> http://dbtg.foundry.sun.com/derby/test/tinderbox_trunk16/jvm1.6/testing/Limited/testSummary-805576.html
> ,
> http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.6/testing/Limited/testSummary-805470.html
> .
> The failure signature is
> testStartStopManagementFromApplication(org.apache.derbyTesting.functionTests.tests.management.ManagementMBeanTest)junit.framework.AssertionFailedError:
> expected:<2> but was:<14>
> at
> org.apache.derbyTesting.functionTests.tests.management.ManagementMBeanTest.startStopManagement(ManagementMBeanTest.java:86)
> at
> org.apache.derbyTesting.functionTests.tests.management.ManagementMBeanTest.testStartStopManagementFromApplication(ManagementMBeanTest.java:56)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at
> org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
> at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
> at junit.extensions.TestSetup.run(TestSetup.java:25)
> at
> org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
> This seems to be a similar failure signature as for DERBY-3561 and
> DERBY-3499. I choose to create a new issue for the new occurrences.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.