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] Updated: (HARMONY-4451) [buildtest][func] Testcase testRoleInfoInfinity in RoleTest is not correct
Date Fri, 13 Jul 2007 03:59:04 GMT

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

Vera Petrashkova updated HARMONY-4451:
--------------------------------------

    Description: 
Test functional/org/apache/harmony/test/func/api/javax/management/relation/RoleTest.xml
contains incorrect testcase testRoleInfoInfinity.

According to J2SE API specifications of javax.management.relation.ReleInfo classs:

public RoleInfo(String theName,
                String theRefMBeanClassName,
                boolean theIsReadable,
                boolean theIsWritable,
                int theMinDegree,
                int theMaxDegree,
                String theDescription)
         throws IllegalArgumentException,
                InvalidRoleInfoException,
                ClassNotFoundException,
                NotCompliantMBeanException

Parameters: 
   theMinDegree - minimum degree for role, i.e. minimum number of MBeans to provide in corresponding
role 
                                Must be less or equal than theMaxDegree. (ROLE_CARDINALITY_INFINITY
for unlimited) 
   theMaxDegree - maximum degree for role, i.e. maximum number of MBeans to provide in corresponding
role 
                                Must be greater or equal than theMinDegree (ROLE_CARDINALITY_INFINITY
for unlimited) 

But this test creates unlimited RoleInfo objects using theMaxDegree = 4 and theMinDegree =
0
See source code RoleTest.java
-------------
    public Result testRoleInfoInfinity() throws Exception {

        try {
            new RoleInfo("usualRole", classPath, true, true,
                    RoleInfo.ROLE_CARDINALITY_INFINITY, 4, "Unit role"); <<<<<<<<<<<<<
            new RoleInfo("usualRole", classPath, true, true,
                    RoleInfo.ROLE_CARDINALITY_INFINITY,
                    RoleInfo.ROLE_CARDINALITY_INFINITY, "Unit role");
            new RoleInfo("usualRole", classPath, true, true, 0,                 <<<<<<<<<<<<<
                    RoleInfo.ROLE_CARDINALITY_INFINITY, "Unit role");
        } catch (Exception e) {
            return failed(e.toString());
        }
--------------
As the result this test fails on RI and Harmony with InvalidRoleInfoException.

These testcase should be redesigned.



  was:
According to J2SE API specifications of javax.management.relation.ReleInfo classs:

public RoleInfo(String theName,
                String theRefMBeanClassName,
                boolean theIsReadable,
                boolean theIsWritable,
                int theMinDegree,
                int theMaxDegree,
                String theDescription)
         throws IllegalArgumentException,
                InvalidRoleInfoException,
                ClassNotFoundException,
                NotCompliantMBeanException

Parameters: 
   theMinDegree - minimum degree for role, i.e. minimum number of MBeans to provide in corresponding
role 
                                Must be less or equal than theMaxDegree. (ROLE_CARDINALITY_INFINITY
for unlimited) 
   theMaxDegree - maximum degree for role, i.e. maximum number of MBeans to provide in corresponding
role 
                                Must be greater or equal than theMinDegree (ROLE_CARDINALITY_INFINITY
for unlimited) 

But this test creates unlimited RoleInfo objects using theMaxDegree = 4 and theMinDegree =
0
See source code RoleTest.java
-------------
    public Result testRoleInfoInfinity() throws Exception {

        try {
            new RoleInfo("usualRole", classPath, true, true,
                    RoleInfo.ROLE_CARDINALITY_INFINITY, 4, "Unit role"); <<<<<<<<<<<<<
            new RoleInfo("usualRole", classPath, true, true,
                    RoleInfo.ROLE_CARDINALITY_INFINITY,
                    RoleInfo.ROLE_CARDINALITY_INFINITY, "Unit role");
            new RoleInfo("usualRole", classPath, true, true, 0,                 <<<<<<<<<<<<<
                    RoleInfo.ROLE_CARDINALITY_INFINITY, "Unit role");
        } catch (Exception e) {
            return failed(e.toString());
        }
--------------
As the result this test fails on RI and Harmony with InvalidRoleInfoException.

These testcase should be redesigned.




> [buildtest][func] Testcase testRoleInfoInfinity in RoleTest is not correct
> --------------------------------------------------------------------------
>
>                 Key: HARMONY-4451
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4451
>             Project: Harmony
>          Issue Type: Bug
>          Components: build - test - ci
>            Reporter: Vera Petrashkova
>            Priority: Minor
>
> Test functional/org/apache/harmony/test/func/api/javax/management/relation/RoleTest.xml
> contains incorrect testcase testRoleInfoInfinity.
> According to J2SE API specifications of javax.management.relation.ReleInfo classs:
> public RoleInfo(String theName,
>                 String theRefMBeanClassName,
>                 boolean theIsReadable,
>                 boolean theIsWritable,
>                 int theMinDegree,
>                 int theMaxDegree,
>                 String theDescription)
>          throws IllegalArgumentException,
>                 InvalidRoleInfoException,
>                 ClassNotFoundException,
>                 NotCompliantMBeanException
> Parameters: 
>    theMinDegree - minimum degree for role, i.e. minimum number of MBeans to provide in
corresponding role 
>                                 Must be less or equal than theMaxDegree. (ROLE_CARDINALITY_INFINITY
for unlimited) 
>    theMaxDegree - maximum degree for role, i.e. maximum number of MBeans to provide in
corresponding role 
>                                 Must be greater or equal than theMinDegree (ROLE_CARDINALITY_INFINITY
for unlimited) 
> But this test creates unlimited RoleInfo objects using theMaxDegree = 4 and theMinDegree
= 0
> See source code RoleTest.java
> -------------
>     public Result testRoleInfoInfinity() throws Exception {
>         try {
>             new RoleInfo("usualRole", classPath, true, true,
>                     RoleInfo.ROLE_CARDINALITY_INFINITY, 4, "Unit role"); <<<<<<<<<<<<<
>             new RoleInfo("usualRole", classPath, true, true,
>                     RoleInfo.ROLE_CARDINALITY_INFINITY,
>                     RoleInfo.ROLE_CARDINALITY_INFINITY, "Unit role");
>             new RoleInfo("usualRole", classPath, true, true, 0,                 <<<<<<<<<<<<<
>                     RoleInfo.ROLE_CARDINALITY_INFINITY, "Unit role");
>         } catch (Exception e) {
>             return failed(e.toString());
>         }
> --------------
> As the result this test fails on RI and Harmony with InvalidRoleInfoException.
> These testcase should be redesigned.

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


Mime
View raw message