harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vera Petrashkova (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4455) [buildtest][func] Testcase testIsActive in StructureTest is not correct
Date Fri, 13 Jul 2007 05:26:04 GMT
[buildtest][func] Testcase testIsActive in StructureTest is not correct

                 Key: HARMONY-4455
                 URL: https://issues.apache.org/jira/browse/HARMONY-4455
             Project: Harmony
          Issue Type: Bug
          Components: build - test - ci
            Reporter: Vera Petrashkova
            Priority: Minor

Functional test 
contains incorrect testcase testIsActive

According to J2SE API specifications of javax.management.relation.RelationService classs:
    public void isActive()
              throws RelationServiceNotRegisteredException
    Checks if the Relation Service is active. 
    Current condition is that the Relation Service must be registered in the MBean Server

    Specified by: 
                isActive in interface RelationServiceMBean
          RelationServiceNotRegisteredException - if it is not registered

The specification does not say that RelationService unregistered  in the MBean Server becomes
and isActive mthod must throw RelationServiceNotRegisteredException.

But the test case testIsActive  expects that isActive() method will throw RelationServiceNotRegisteredException
if RelationService was registered and then unregistered in MBean Server

See source code StructureTest.java
        public Result testIsActive() throws Exception {

        MBeanServer mBeanServer = MBeanServerFactory.createMBeanServer();

        RelationService relationService = new RelationService(true);
        ObjectName relationServiceName = new ObjectName(

        mBeanServer.registerMBean(relationService, relationServiceName);

        try {
            return failed("isActive method incorrect");
        } catch (RelationServiceNotRegisteredException e) {
            return passed();
As the result this test fails on RI and Harmony because RelationServiceNotRegisteredException
is not thrown.

This test should be redesigned or removed

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message