Double checking my maven understanding here, maven test dependencies are
not transitive (which is why we ended up with so much duplication), by
moving the dependencies to root pom the test scope dependencies are
inherited by child modules eliminating all the duplication.
--
Jody Garnett


On Thu, 2 Jun 2022 at 02:49, Andrea Aime <andrea.a...@geosolutionsgroup.com>
wrote:

> Hi all,
> one of the things that have been bothering me lately is that
> test dependency management
> in GeoServer is a bit messy:
>
>    - Having to declare the basic dependencies every time they are needed
>    to write a test
>    - Use of different libraries, or ad-hoc code while a library would do
>    - General lack of uniformity
>
> I started with this PR <https://github.com/geoserver/geoserver/pull/5919>,
> that's centralizing all basic test dependencies in the main pom, giving all
> modules a basic set of testing tools that everyone can use with no extra
> effort:
>
>    - junit and spring-test
>    - hamcrest
>    - xmlunit for xml testing
>    - jsonpath for json testing
>    - jsoup for HTML testing
>    - awaitility for tests that need to wait for asynch processing (rather
>    than doing fixed waits or hand made wait loops)
>
> Once that's in, I'd like to continue by:
>
>    - Removing all Thread.sleep and replace with awaitility, that can poll
>    for a certain condition up to a maximum wait time, but will exit as soon as
>    the condition is met (will go fast on local machines, but wait enough for
>    slow poke github actions)
>    - Settle on _one_ mock library and migrate existing tests. I'd suggest
>    going for mockito, it is more alive than easymock, and often easier to use.
>    - Upgrade test libraries to latest (little by little)
>
> Opinions?
>
> Cheers
> Andrea
>
> ==
> GeoServer Professional Services from the experts!
>
> Visit http://bit.ly/gs-services-us for more information.
> ==
>
> Ing. Andrea Aime
> @geowolf
> Technical Lead
>
> GeoSolutions Group
> phone: +39 0584 962313
>
> fax:     +39 0584 1660272
>
> mob:   +39  333 8128928
>
> https://www.geosolutionsgroup.com/
>
> http://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
> Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE
> 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si
> precisa che ogni circostanza inerente alla presente email (il suo
> contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è
> riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il
> messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra
> operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
>
> This email is intended only for the person or entity to which it is
> addressed and may contain information that is privileged, confidential or
> otherwise protected from disclosure. We remind that - as provided by
> European Regulation 2016/679 “GDPR” - copying, dissemination or use of this
> e-mail or the information herein by anyone other than the intended
> recipient is prohibited. If you have received this email by mistake, please
> notify us immediately by telephone or e-mail
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to