question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get upgrade integration tests to run using `DropwizardTestSupport` inside classloaders and reflection

See original GitHub issue

It should be possible to run:

mvn -Pintegration-upgrade-tests -Dtest=ReaperCassandraIT

but trying to start the jetty/jersey server via reflection ( https://github.com/thelastpickle/cassandra-reaper/blob/master/src/server/src/test/java/io/cassandrareaper/acceptance/ReaperTestJettyRunner.java#L171 ) throws a class cast exception (around jboss’ AutoDiscoverable).

When this is fixed then the upgrade integration tests can be uncommented and run again in both travis and circleCI.

The requirement to the upgrade integration tests is that the previous versions of ReaperApplication (inside a DropwizardTestSupport) is run via separated classloaders. The classloaders need to be child-first, as opposed to parent-first, for this to work. The upgrade integration tests run the cucumber scenarios against the past version of a ReaperApplication test server, and then mid-scenario replaces the ReaperApplication test server with once from the test classpath. The upgrade integration tests ensure all normal Reaper operations complete successfully while Reaper is upgraded.

┆Issue is synchronized with this Jira Task by Unito ┆Issue Number: K8SSAND-384

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:31 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
aahutsalcommented, Mar 20, 2019

@michaelsembwever I’ve managed to build successfully (the only thing bower been needed to be installed globally through npm i -g bower. That should be stated somewhere in docs).

Seems your issue explained here: https://stackoverflow.com/questions/37145127/java-lang-classcastexception-org-glassfish-jersey-jackson-internal-jacksonautod

so, going to play with it once @gitcoinbot allow me to bid on

1reaction
aahutsalcommented, Apr 5, 2019

@michaelsembwever could you please help with that?

image

This happens on circleci local execute --config .circleci/config.yml

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support for dropwizard v0.8 series · Issue #30 - GitHub
Are there any plans to support dropwizard's v0.8 series? It introduces some breaking API changes with many dependency version upgrades, ...
Read more >
Testing Dropwizard
Testing Dropwizard . The dropwizard-testing module provides you with some handy classes for testing your representation classes and resource classes.
Read more >
Integration tests mysteriously fail if DynamoDb Local is added ...
I'm trying to run integration tests w/ Dropwizard, here's the base class: ... Your classloader is likely pulling in the older version when...
Read more >
Integration tests in ASP.NET Core | Microsoft Learn
Learn how integration tests ensure that an app's components function correctly at the infrastructure level, including the database, ...
Read more >
Using different classloaders for different JUnit tests?
Note I had to do this to test code running in a legacy framework which I couldn't ... You can use Reflection to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found