9 Replies Latest reply on Feb 9, 2006 5:01 AM by Adrian Brock

    backport-concurrent-util

    Adrian Brock Master

      I've added a build for this into our cvs. It is the version 2.1, tagged BUC_2_1
      http://dcl.mathcs.emory.edu/util/backport-util-concurrent/

      Let's discuss here what we need in terms of QA before people start using it.

      Link to testsuite not in our cvs.
      http://dcl.mathcs.emory.edu/cgi-bin/viewcvs.cgi/software/util/backport-util-concurrent/test/

        • 1. Re: backport-concurrent-util
          Adrian Brock Master

          cvs is not working, so I've downloaded the tarball.
          I'm going to look at it.

          • 2. Re: backport-concurrent-util
            Adrian Brock Master

            I've added the tests.

            The main problem I can see is that some use a timeout of 300ms
            which means they can fail randomly when the host is busy doing something else.

            This is configurable via the system property "tck.shortDelay".

            There are also some stress tests in test/loops, but they aren't junit tests.

            • 3. Re: backport-concurrent-util
              Scott Stark Master

              I see a new concurrent cvs module for this. This only compiles under jdk1.4.2 due to conflicts with java.util.* imports that look to be caused by the wildard import usage. Would't hurt to require building with 1.4.x would it?

              • 5. Re: backport-concurrent-util
                Adrian Brock Master

                I've implemented a retrocheck task, sample output:

                [ejort@htimes2 jbossretro]$ ant tests
                Buildfile: build.xml
                
                check:
                [retrocheck] Check Successful: 1014 ms
                [retrocheck] ==== /home/ejort/retro/workspace/jbossretro/output/test-classes14/org/jboss/test/enums/SimpleEnumTypesTestCase.class
                [retrocheck] Cannot find method org.jboss.util.EnumSet.range(Lorg/jboss/lang/Enum;Lorg/jboss/lang/Enum;)Lorg/jboss/util/EnumSet;
                [retrocheck] Cannot find method org.jboss.util.EnumSet.allOf(Ljava/lang/Class;)Lorg/jboss/util/EnumSet;
                [retrocheck] Cannot find method org.jboss.util.EnumSet.complementOf(Lorg/jboss/util/EnumSet;)Lorg/jboss/util/EnumSet;
                [retrocheck] ==== /home/ejort/retro/workspace/jbossretro/output/test-classes14/org/jboss/test/util/AllConcurrentTestCase.class
                [retrocheck] Cannot find method edu.emory.mathcs.backport.java.util.concurrent.DelayQueue.add(Ledu/emory/mathcs/backport/java/util/concurrent/Delayed;)Z
                [retrocheck] ==== /home/ejort/retro/workspace/jbossretro/output/test-classes14/org/jboss/test/annotations/AnnotationsTestCase.class
                [retrocheck] Cannot find method java.lang.reflect.Method.isAnnotationPresent(Ljava/lang/Class;)Z
                [retrocheck] Cannot find method java.lang.reflect.Method.getAnnotation(Ljava/lang/Class;)Lorg/jboss/lang/Annotation;
                [retrocheck] Cannot find method java.lang.reflect.Method.getAnnotations()[Lorg/jboss/lang/Annotation;
                [retrocheck] ==== /home/ejort/retro/workspace/jbossretro/output/test-classes14/org/jboss/test/enums/Card.class
                [retrocheck] Cannot find constructor org.jboss.util.EnumMap(Ljava/lang/Class;)V
                [retrocheck] Cannot find constructor org.jboss.util.EnumMap(Ljava/lang/Class;)V
                
                BUILD FAILED
                /home/ejort/retro/workspace/jbossretro/build.xml:180: Java returned: 1
                


                • 6. Re: backport-concurrent-util
                  ryan.campbell Expert

                  I guess we want these tests under cruisecontrol if we are going to be maintaining our own fork?

                  I'm not sure what extra coverage we could provide besides using the AS testsuite (which would require making the big leap) or some detailed analysis of the existing test coverage to see what tests need writing.

                  • 7. Re: backport-concurrent-util
                    Adrian Brock Master

                    I don't want to fork the project unless we have to.
                    And even then only temporarily.

                    I put it in CVS so we have a consistent build (the base relase has no ant scripts)
                    with our own tags and releases.

                    Fixes should be contributed back to backport-concurrent-util

                    Yes. Please add the tests to cruisecontrol.

                    We also need to investigate the loop tests. The doco says these
                    are also good tests of whether the OS/JVM supports SMP properly.

                    So we might want to use them as a basis of a generic tool available to users
                    to validate their environment!

                    • 8. Re: backport-concurrent-util
                      ryan.campbell Expert

                      Testsuite automation task: http://jira.jboss.com/jira/browse/JBQA-291

                      Just to refresh my memory, the idea here is to use the retroweaver to map java5's java.util.concurrent to the equivalent backport packages. So this jar will need to be on the classpath of any retroweaved classes.

                      • 9. Re: backport-concurrent-util
                        Adrian Brock Master

                        That is correct.