rdf4j icon indicating copy to clipboard operation
rdf4j copied to clipboard

Clean up test server implementations

Open abrokenjester opened this issue 2 years ago • 2 comments

The test rig currently has at least four separate implementations of a Jetty-based test server:

  • org.eclipse.rdf4j.http.server.TestServer (in rdf4j-http-server unit tests)
  • org.eclipse.rdf4j.repository.http.HTTPMemServer (in rdf4j-repository-compliance)
  • org.eclipse.rdf4j.query.parser.sparql.SPARQLEmbeddedServer (in rdf4j-sparql-compliance)
  • org.eclipse.rdf4j.federated.server.SPARQLEmbeddedServer (in rdf4j-tools-federation)

All four do essentially the same thing: spin up an RDF4J Server on localhost with a few test repositories to run tests over HTTP against. We should unify these into a single reusable test utility.

abrokenjester avatar Dec 11 '21 21:12 abrokenjester

Seems to be duplicate of #2933

barthanssens avatar Jan 14 '22 17:01 barthanssens

Seems to be duplicate of #2933

Oops! So it is, well spotted. The description on this issue is more up to date so I'll close the other one.

abrokenjester avatar Jan 14 '22 20:01 abrokenjester

@abrokenjester @barthanssens WDYT about adopting something like https://mjeanroy.dev/junit-servers/ instead of building our own test utility? I did a small POC, and seems to work well.

erikgb avatar Feb 16 '23 22:02 erikgb

Here is an MVP POC showing how this could look like: https://github.com/eclipse/rdf4j/pull/4437

erikgb avatar Feb 17 '23 09:02 erikgb