thanks, great! unfortuantely the integration tests are now failing again. but your changes to org.apache.sling.junit.core do not seem to be the reason - even when rolling back to the latest snapshot before it's failing. same problem as before - "Bundle org.apache.sling.junit.core is NOT whitelisted", although it's whitelisted and the regex is excaped correctly. seemed to be pure luck that it worked 2 times during this day, all other runs just failed on jenkins.
locally i can reproduce: - always runs fine on windows 10/java 8 - always fails in a vagrant box with ubuntu/java 8 perhaps there is a timing issue that loads the OSGi config for LoginAdminWhitelist too late - and for some reasons only on unix environments?! stefan >-----Original Message----- >From: Julian Sedding [mailto:[email protected]] >Sent: Monday, November 28, 2016 6:45 PM >To: Sling Developers List >Subject: Re: integration test fail due to LoginAdminWhitelist > >Hi Stefan > >When analyzing the issue I noticed that the test was waiting for the >ResourceResolverFactory service to become available. However, it is >possible that the test starts before even all bundles in the >repository are active (SLING-6334[0]). Thus, especially on slow >systems, the likelihood of a timeout (10s by default) when waiting for >a service is increased. Furthermore, the system was polled for the >presence of the service every 50ms. In my local tests that seemed to >slow down the service becoming available by up to 3 seconds. Waiting >for the service can be done with a ServiceTracker instead of polling >(SLING-6335[1]). > >After applying my changes, the time from when the test starts (after >all bundles are active) and the time the ResourceResolverFactory >becomes available went down from 10+ to ~3 seconds. > >Regards >Julian > >[0] https://issues.apache.org/jira/browse/SLING-6334 >[1] https://issues.apache.org/jira/browse/SLING-6335 > > >On Mon, Nov 28, 2016 at 2:02 PM, Stefan Seifert <[email protected]> >wrote: >> this fix of my problem was finally quite simple: i just had to double the >backslashes to escape them [1], and then it works, and the generated >slingstart.txt contains the same string as before. >> >> what is still strange that on my system (windows 10 machine with java 8) >it worked without proper escaping, whereas it failed on Jenkins and on >julians machine. >> >> stefan >> >> [1] >https://github.com/apache/sling/blob/trunk/contrib/extensions/contextaware- >config/integration-tests/src/main/provisioning/sling.txt#L26 >> >> >> >>>-----Original Message----- >>>From: Konrad Windszus [mailto:[email protected]] >>>Sent: Monday, November 28, 2016 1:06 PM >>>To: [email protected] >>>Subject: Re: integration test fail due to LoginAdminWhitelist >>> >>>One last addendum: >>>Since quoted-string in RFC 2616 has some known bugs >>>(http://stackoverflow.com/questions/7886782/what-is-the-exact-syntax-and- >>>semantics-of-a-quoted-string-in-the-http1-1-rfc2616) we should only refer >>>to https://tools.ietf.org/html/rfc7230#section-3.2.6 instead (in the >>>documentation). >>> >>>> On 28 Nov 2016, at 12:45, Stefan Seifert <[email protected]> >wrote: >>>> >>>> >>>>> Your current configuration looks like this: >>>>> whitelist.bundles.regexp="^org\.apache\.sling\.junit(\..*)?$" >>>>> >>>>> Inside target/slingstart.txt this becomes: >>>>> whitelist.bundles.regexp="^org.apache.sling.junit(..*)?$" >>>>> >>>>> Note: all slashes have disappeared. >>>> >>>> this is strange, yes. >>>> the same escaping problem happens on my local machine - but there the >>>integration test passes. >>>> you could reproduce the problem on your machine? >>>> >>>> as a workaround i will simplify the regex and remove the backslashes. >>>> >>>> i think we have currently no precise documentation of the sling >>>provisioning file format esp. regarding escaping rules. on [1] only some >>>details of the embedded osgi configuration format are documented. >>>> >>>> stefan >>>> >>>> [1] https://sling.apache.org/documentation/development/slingstart.html >>>> >>> >> >>
