1 2 Previous Next 17 Replies Latest reply on Jan 21, 2009 9:21 AM by bortx

    Jarjared version of JBC3 for using in JBossAS 4.2

    jorgemoralespou_2

      Hi,
      I have made a jar jared version of JBC 3.0.x with JGroups also jarjared for using in a JBoss AS 4.2.x installation. The thing is it didn't work, so I had to use a move refactoring with the sources in eclipse to make it work. I'm in a testing phase, because I'm not very confident it is going to work 100% error free.
      I have to change a Jgroups class entirely (org.jgroups.conf.MagicNumberReader) to make it work.

      Is there a test suite that I can use to validate the refactorings and the renamed version of jbc? This would ease my work.

      Thanks,

        • 1. Re: Jarjared version of JBC3 for using in JBossAS 4.2
          jason.greene

          Did you try doing a search replace on jg-magic-map.xml?

          • 2. Re: Jarjared version of JBC3 for using in JBossAS 4.2
            jorgemoralespou_2

            Yes, that's what I did at first, but it didn't work. Maybe my fault?
            So I had hardcoded magicNumbers in the java class, so refactorings work better for my case.

            I still want to know if there is a test suite to pass over JBC to verify it works correctly. I have downloaded the distrib, which includes a sources, but no tests.

            • 3. Re: Jarjared version of JBC3 for using in JBossAS 4.2
              brian.stansberry

              Suggest you get the source from svn directly. Tagged releases are under http://anonsvn.jboss.org/repos/jbosscache/core/tags.

              • 4. Re: Jarjared version of JBC3 for using in JBossAS 4.2
                manik

                The tests are included in the JBC -src.ZIP distros though (3.x onwards). Ther're in the src/test/java directory.

                • 5. Re: Jarjared version of JBC3 for using in JBossAS 4.2

                  Hi,

                  I'm trying to run the tests on 3.0.2.CR2 distro. It compiles successfully, but I'm getting lot of failures as test result. I would paste some surefire reports, but there are a lot of them. Maybe they are all about cache initialization. I don't know if I have to configure any resource to make them run.

                  I'm using maven 2.0.9, the only thing I have configured is what is specified on README-Maven file:

                  <profiles>
                   <profile>
                   <id>jboss</id>
                   <properties>
                   <maven.repository.root>/Users/manik/Code/maven2</maven.repository.root>
                   </properties>
                   </profile>
                   </profiles>
                  
                   <activeProfiles>
                   <activeProfile>jboss</activeProfile>
                   </activeProfiles>


                  I would give you any important information I have omitted inmediately

                  Thanks a lot

                  • 6. Re: Jarjared version of JBC3 for using in JBossAS 4.2
                    manik

                    we have some known issues with JDK 6 at the moment (mainly due to the test harness, introduced when we tried t parallelize the test suite) and there were 2 or 3 intermittent failures when using JDK 5. Do any of these apply to you?

                    We plan to close these up this week in time for a GA.

                    • 7. Re: Jarjared version of JBC3 for using in JBossAS 4.2

                      yep, I'm using jdk 5 and these are my test results

                      Tests run: 7637, Failures: 492, Errors: 0, Skipped: 5993

                      • 8. Re: Jarjared version of JBC3 for using in JBossAS 4.2
                        mircea.markus

                        After each suite run there is are some info printed to the console, something like:
                        ~~~~~~~~~~~~~~~~~~~~~~~~~ ENVIRONMENT INFO ~~~~~~~~~~~~~~~~~~~~~~~~~~
                        bind.address = 127.0.0.1
                        java.vm.version = 1.5.0_15-b04
                        os.name = 1.5.0_15-b04
                        os.version = 2.6.9-42.0.10.ELsmp
                        sun.arch.data.model = 32
                        ~~~~~~~~~~~~~~~~~~~~~~~~~ ENVIRONMENT INFO ~~~~~~~~~~~~~~~~~~~~~~~~~~
                        Tests run: 3532, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 325.389 sec

                        Can you please post that. Also, what is the exact command line you use for kicking the tests.

                        • 9. Re: Jarjared version of JBC3 for using in JBossAS 4.2

                          This is the info

                          ~~~~~~~~~~~~~~~~~~~~~~~~~ ENVIRONMENT INFO ~~~~~~~~~~~~~~~~~~~~~~~~~~
                          bind.address = 127.0.0.1
                          java.vm.version = 1.5.0_15-b04
                          os.name = 1.5.0_15-b04
                          os.version = 2.6.24-22-generic
                          sun.arch.data.model = 32
                          ~~~~~~~~~~~~~~~~~~~~~~~~~ ENVIRONMENT INFO ~~~~~~~~~~~~~~~~~~~~~~~~~~
                          Tests run: 7637, Failures: 492, Errors: 0, Skipped: 5993, Time elapsed: 129.376 sec <<< FAILURE!

                          I used mvn clean install to kick the tests, but using mvn test I get the same results

                          • 10. Re: Jarjared version of JBC3 for using in JBossAS 4.2
                            mircea.markus

                            There is an issue with mvn test. For now, can you please use:
                            mvn -P test-functional test
                            or
                            mvn -P test-hudson test

                            • 11. Re: Jarjared version of JBC3 for using in JBossAS 4.2

                              Ok, that works sucessfully. Can you please include this info in distribution's README file? I think it will help others.

                              Thanks for your fast help!

                              • 12. Re: Jarjared version of JBC3 for using in JBossAS 4.2
                                mircea.markus

                                yep, will do. Actually I'm thinking to make mvn test do the same think as mvn -Ptest-functional test, because every mvn user will (naturally) try running the test this way (i.e. mvn test).

                                • 13. Re: Jarjared version of JBC3 for using in JBossAS 4.2
                                  jorgemoralespou_2

                                  We`ve been working hard on this one, and to the moment we are having issues with JBC tests. We have refactored jgroups to mycompany.org.jgroups, and passed all tests in JGroups distro.
                                  We have refactored JBC3 to use this mycompany.jgrousp, and all tests passed ok.
                                  Then we`ve been refactoring org.jboss.cache to mycompany.org.jboss.cache. And a lot of tests fail.
                                  We have taken a lot of care in refactoring config files, hard-coded strings and classes. Everything compiles perfectly, but we have problems trying to pass the test suite.
                                  Problems are odd, like if creating the ComponentRegistry were not registering the right components.

                                  For example, debugging PFERMvccInvalidationAsyncTest. It is creating a Mock implementation (actually a Proxy) when creating the cache from the configs.
                                  In PutForExternalReadTestBase.java:116 and PutForExternalReadTestBase.java:117 we are getting a proxy instance, but when executing the original code, we get an instance of an RPCManagerImpl for code on PutForExternalReadTestBase.java:117.

                                  Is there anything tricky about JBC that we should know to refactor this?
                                  Has anybody tried to do this before, to be able to run JBC3 inside a JBAS 4.2.

                                  I think thare there should be a lot of people willing for this to work.

                                  Thanks.

                                  • 14. Re: Jarjared version of JBC3 for using in JBossAS 4.2
                                    manik

                                    I don't think anyone has tried this before, although it should be possible.

                                    Some tests may fail since JBC trunk uses a parallel test suite. To deal with this, the UnitTestCacheFactory makes use of a lot of reflection in finding cache components and making sure they are properly isolated for each testing thread.

                                    When you refer to PutForExternalReadTestBase, which version are you talking about? In trunk, 116 and 117 are meaningless. :-)

                                    1 2 Previous Next