11 Replies Latest reply on Feb 7, 2007 6:51 AM by alesj

    Failing tests

      Some of the tests in the Microcontainer are failing because this change
      http://viewvc.jboss.org/cgi-bin/viewvc.cgi/common/common-core/trunk/src/main/java/org/jboss/util/xml/JBossEntityResolver.java?r1=2222&r2=2237
      has not made into jboss-common-core.jar that is used by the MC build.

        • 1. Re: Failing tests
          starksm64

          I'll fix this.

          • 2. Re: Failing tests
            starksm64

            The common-core version has been updated to 2.0.4.Alpha3 to pickup this change. There still is one expected test failure in the kernel module I need to resolve:

            InstantiateXMLTestCase.testValueInstantiateFromJavabean2

            junit.framework.AssertionFailedError
             at junit.framework.Assert.fail(Assert.java:47)
             at junit.framework.Assert.assertTrue(Assert.java:20)
             at junit.framework.Assert.assertTrue(Assert.java:27)
             at org.jboss.test.kernel.config.test.InstantiateXMLTestCase.testValueInstantiateFromJavabean2(InstantiateXMLTestCase.java:57)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             at java.lang.reflect.Method.invoke(Method.java:585)
             at junit.framework.TestCase.runTest(TestCase.java:154)
             at junit.framework.TestCase.runBare(TestCase.java:127)
             at junit.framework.TestResult$1.protect(TestResult.java:106)
             at junit.framework.TestResult.runProtected(TestResult.java:124)
             at junit.framework.TestResult.run(TestResult.java:109)
             at junit.framework.TestCase.run(TestCase.java:118)
             at junit.framework.TestSuite.runTest(TestSuite.java:208)
             at junit.framework.TestSuite.run(TestSuite.java:203)
             at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
             at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
             at junit.framework.TestResult.runProtected(TestResult.java:124)
             at junit.extensions.TestSetup.run(TestSetup.java:23)
             at junit.framework.TestSuite.runTest(TestSuite.java:208)
             at junit.framework.TestSuite.run(TestSuite.java:203)
             at junit.framework.TestSuite.runTest(TestSuite.java:208)
             at junit.framework.TestSuite.run(TestSuite.java:203)
             at junit.framework.TestSuite.runTest(TestSuite.java:208)
             at junit.framework.TestSuite.run(TestSuite.java:203)
            



            • 3. Re: Failing tests

              I've fixed the javabean2 test.

              The problem was caused because there was no constructor element
              on which the construction callback was invoked.

              I've added some fixup in the endElement of the javabean to cope with this case.

              • 4. Re: Failing tests

                I don't like that this javabean2 code is using the MC metadata.

                1) There is no way the javabean xml can support all this metadata
                2) I want to move the javabean xml to the container project since it should
                only really be relying on the BeanInfo abstraction.

                The reason I have not moved it before is because it has a dependency
                on the KernelConfig class, so it needs a bit of refactoring to make this possible.

                • 5. Re: Failing tests
                  alesj

                   

                  "adrian@jboss.org" wrote:

                  The reason I have not moved it before is because it has a dependency
                  on the KernelConfig class, so it needs a bit of refactoring to make this possible.


                  If you give me some directions, I can take a shot at this.

                  • 6. Re: Failing tests

                     


                    If you give me some directions, I can take a shot at this.


                    Basically move
                    org.jboss.kernel.plugins.config.xml
                    to something like
                    org.jboss.javabean.plugins.xml
                    in the container project and remove all dependency on the kernel project.

                    It means changing it to use the
                    org.jboss.config.spi.Configuration
                    api rather the KernelConfig.

                    There might be a few other issues as well?

                    • 7. Re: Failing tests
                      starksm64

                      I think the Configuration class is missing some function to create the ctor joinpoints which is why I had to use the KernelConfig and kernel metadata.

                      • 8. Re: Failing tests
                        alesj

                         

                        "adrian@jboss.org" wrote:

                        Basically move
                        org.jboss.kernel.plugins.config.xml
                        to something like
                        org.jboss.javabean.plugins.xml
                        in the container project and remove all dependency on the kernel project.

                        It means changing it to use the
                        org.jboss.config.spi.Configuration
                        api rather the KernelConfig.

                        There might be a few other issues as well?


                        I rewrote the whole JavaBean wiring into the container.

                        The only issue that I have is with Ambiguity test case - since there are two setter methods named setSomething in AmbiguityBean. One takes Integer the other String. And I cannot diff the two of them with the new BeanInfo / PropertyInfo get/set/invoke notion.

                        • 9. Re: Failing tests
                          alesj

                           

                          "alesj" wrote:
                          The only issue that I have is with Ambiguity test case - since there are two setter methods named setSomething in AmbiguityBean. One takes Integer the other String. And I cannot diff the two of them with the new BeanInfo / PropertyInfo get/set/invoke notion.


                          I fixed this.
                          I added NestedPropertyInfo - which can handle setter invocations - depending on the TypeInfo value of value to be set.

                          • 10. Re: Failing tests

                            You need to move the tests to the container project as well.

                            • 11. Re: Failing tests
                              alesj

                               

                              "adrian@jboss.org" wrote:
                              You need to move the tests to the container project as well.


                              Done.
                              And moved javabean schema as well (forgot to do it before ;-).