Move some test infrastructure from dspace-server-webapp to dspace-api?

4 views
Skip to first unread message

Mark H. Wood

unread,
Jul 3, 2020, 5:38:11 PM7/3/20
to dspace...@googlegroups.com
I've been trying to write an IT for a dspace-api method that uses
Solr, and I keep running into things that already exist but are over
in dspace-server-webapp. See https://github.com/DSpace/DSpace/pull/2825
which currently lacks only test code.

I read the Code Testing Guide to learn the current recommendations,
and was reminded of the nice set of Builders that we have for DSOs.
Yeah, where are those again? Oops, wrong project. I get to figure
out how to let assertions fail and still clean up all the mess I've
made in the database.

Also I need embedded Solr. Here the situation is tricky: we have
identically-named org.dspace.statistics.MockSolrLoggerServiceImpl and
org.dspace.solr.MockSolrServer in both projects, and it appears that
the only difference is that the one in dspace-api does not spin up an
embedded Solr instance!

Is there any reason why I shouldn't just whip up a separate patch to
move all this stuff over to dspace-api? It's a dependency of
dspace-server-webapp so that project will still have access to it
all. I'm particularly keen to kill off the duplication of mock Solr
classes which only works because we make the right mystic gestures to
get some classpath magic to work.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc
Reply all
Reply to author
Forward
0 new messages