1 Reply Latest reply on Aug 25, 2009 3:01 PM by thomas.diesler

    tests log4j.xml

      I've removed this again.

      Having a default log4j.xml for tests is stupid because of the following reasons.

      1) log4j.test.dir is not always set - e.g. impossible to run the tests under eclipse
      2) you don't get the logging when you look the test reports in the target folder
      3) turning off console logging means you have to hunt around for different information
      related to the test instead of searching in one place

        • 1. Re: tests log4j.xml
          thomas.diesler

          This actually works for me very well

          1) I set -Dlog4j.output.dir=${workspace_loc:jboss-osgi-runtime-microcontainer/target} in eclipse

          2) Not sure what you mean. I always have target/test.log that contains all the logging

          3) for me that's quite the opposite. I can grep test.log or have it open in gedit where I can search

          I prefer a console output like this

          -------------------------------------------------------
           T E S T S
          -------------------------------------------------------
          Running org.jboss.test.osgi.service.test.ServiceRegistrationUnitTestCase
          Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.326 sec
          Running org.jboss.test.osgi.bundle.test.BundleContextUnitTestCase
          Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.817 sec
          Running org.jboss.test.osgi.smoke.test.OSGiSmokeTestCase
          Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.726 sec
          Running org.jboss.test.bundle.metadata.VersionRangeTestCase
          Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 sec
          Running org.jboss.test.osgi.launch.FrameworkLaunchTestCase
          Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.195 sec
          Running org.jboss.test.osgi.integration.simple.SimpleLogServiceTestCase
          FIXME [JBOSGI-136] Cannot resolve dependency against unstarted bundle
          FIXME [JBOSGI-135] Cannot handle package beeing imported and exported by the same bundle
          Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.172 sec
          Running org.jboss.test.osgi.classloader.test.ExportImportPackageUnitTestCase
          Tests run: 12, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.579 sec <<< FAILURE!
          Running org.jboss.test.osgi.classloader.test.RequireBundleUnitTestCase
          Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.962 sec
          Running org.jboss.test.osgi.integration.simple.SimpleBundleTestCase
          Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.384 sec
          Running org.jboss.test.osgi.bundle.test.BundleEntriesUnitTestCase
          Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.374 sec
          Running org.jboss.test.osgi.filter.test.FrameworkUtilFilterUnitTestCase
          FIXME [JBOSGI-129] - Invalid (*=b)
          FIXME [JBOSGI-129] - NoMatch (a=)
          FIXME [JBOSGI-129] - NoMatch (a<= 2)
          FIXME [JBOSGI-129] - NoMatch (a<=2 )
          FIXME [JBOSGI-129] - NoMatch (a<= )
          FIXME [JBOSGI-129] - NoMatch (a>= 0)
          FIXME [JBOSGI-129] - NoMatch (a>=0 )
          FIXME [JBOSGI-129] - NoMatch (a>= )
          Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.362 sec
          Running org.jboss.test.osgi.filter.test.BundleContextFilterUnitTestCase
          FIXME [JBOSGI-129] - Invalid (*=b)
          FIXME [JBOSGI-129] - NoMatch (a=)
          FIXME [JBOSGI-129] - NoMatch (a<= 2)
          FIXME [JBOSGI-129] - NoMatch (a<=2 )
          FIXME [JBOSGI-129] - NoMatch (a<= )
          FIXME [JBOSGI-129] - NoMatch (a>= 0)
          FIXME [JBOSGI-129] - NoMatch (a>=0 )
          FIXME [JBOSGI-129] - NoMatch (a>= )
          Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.441 sec
          Running org.jboss.test.osgi.service.test.GetServiceReferencesUnitTestCase
          Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.062 sec
          Running org.jboss.test.bundle.metadata.HeaderValuesTestCase
          Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.068 sec
          Running org.jboss.test.osgi.bundle.test.SystemBundleUnitTestCase
          Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.272 sec
          Running org.jboss.test.osgi.service.test.RegisterServiceUnitTestCase
          Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.15 sec
          Running org.jboss.test.osgi.service.test.GetUnGetServiceUnitTestCase
          Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.276 sec
          Running org.jboss.test.osgi.bundle.test.BundleUnitTestCase
          Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.193 sec
          Running org.jboss.test.osgi.service.test.ServiceReferenceUnitTestCase
          Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.487 sec
          
          Results :
          
          Failed tests:
           testVersionImportPackageFails(org.jboss.test.osgi.classloader.test.ExportImportPackageUnitTestCase)
          


          Anyway, I put log4j.xml in svn:ignore so you won't see it if you don't want to.