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.

TestKit dependency on cassandra-persistance makes impossible to run tests inside IDEA

See original GitHub issue

When running tests from IDEA using JDBC Persistence, they typically fail because the testkit tries to locate/connect to cassandra:

2018-02-26 15:31:00,482 INFO  com.datastax.driver.core.GuavaCompatibility - Detected Guava >= 19 in the classpath, using modern compatibility layer
2018-02-26 15:31:04,588 WARN  akka.persistence.cassandra.journal.CassandraJournal - Failed to connect to Cassandra and initialize. It will be retried on demand. Caused by: Timed out after 2 seconds while waiting for a ServiceLocator. Have you configured one?
2018-02-26 15:31:04,588 WARN  akka.persistence.cassandra.snapshot.CassandraSnapshotStore - Failed to connect to Cassandra and initialize. It will be retried on demand. Caused by: Timed out after 2 seconds while waiting for a ServiceLocator. Have you configured one?
2018-02-26 15:31:04,595 ERROR com.lightbend.lagom.internal.scaladsl.persistence.PersistentEntityActor - Persistence failure when replaying events for persistenceId [MyEntity|abcdefgh]. Last known sequence number [0]
com.lightbend.lagom.internal.persistence.cassandra.NoServiceLocatorException: Timed out after 2 seconds while waiting for a ServiceLocator. Have you configured one?

This is strange because if you are using JDBC Persistence you should not depend on Cassandra at all.

Lagom Version (1.2.x / 1.3.x / etc)

1.4.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
TimMoorecommented, Feb 28, 2018

Reopening… @ignasi35 I think we should fix this. It isn’t working as you would expect. Note that @edmondo1984 is not using mixed persistence, but this issue arises because TestKit has a dependency on the Cassandra persistence library.

I think we need to fix this so that when you explicitly opt into JDBC using TestKit, it sets these properties for you automatically.

1reaction
TimMoorecommented, Mar 15, 2018

I’ve started working on a fix for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theranos promised a blood testing revolution - The Verge
Theranos, despite all its flashy promises, wasn't actually able to run tests accurately in its device on a single drop of blood. Two...
Read more >
"Test events were not received" when run tests using Intellij
For me, the Same issue was occurring, below changes worked for me. IntelliJ Version I am using: 2019.2.2. In IntelliJ IDE, Go to....
Read more >
Blood tech startups are booming following Theranos bust
Experts overwhelmingly agree that running hundreds of tests from just a few drops of blood in a portable machine is an incredibly difficult...
Read more >
Theranos's invention never would have worked. Here's why.
Episode 1: Defrauding investors: $945M lost, who's to blame? https://youtu.be/ga4xebrUkMk Episode 3: The creation of Elizabeth Holmes and ...
Read more >
Moving Past Theranos: What Is Possible With Blood Analysis?
With a trip to a local pharmacy, someone could get testing done without getting blood drawn and receive the results in hours, rather...
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