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.

PersistentEntityTestDriver improvements

See original GitHub issue

Tests based on PersistentEntityTestDriver present some repetitive idioms like:

  • asserting there’s no serialization issues
  • asserting every command handler sends a reply

Writing the tests in Java using JUnit there’s a common snippet in an @After method.

Writing tests in Scala (using scalatest) has similar code duplication. In scalatest-based tests in particular Lagom’s testkit could provide ScalaTest fixture traits to remove the duplication and provide default assertions.

Credit: inspired by scalatestplus-play

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
PerWiklandercommented, Oct 1, 2018

Sorry, didn’t check the PR first. Looks like your implementation is very much like mine except throwing an exception instead of using test framework specific checks. And nothing is stopping a user from extending your trait into something more test framework specific if one wanted to do so.

1reaction
eripcommented, Oct 1, 2018

@PerWiklander There’s an open PR; the issue is that we don’t want to marry this to scalatest, so we can’t depend on those mixins. See the linked PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Persistent Entity (classic) - Lagom Framework
A PersistentEntity has a stable entity identifier, with which it can be accessed from the service implementation or other places. The state of...
Read more >
lagom模板帮助文档 - CSDN
单元测试的实体可以使用PersistentEntityTestDriver,将不使用一个数据库的情况下 ... 1000- Rainbow: Rainbow: Combining Improvements in Deep Reinforcement ...
Read more >
Untitled
Previous issue PersistentEntityTestDriver improvements. Although the ultimate solution would be not to have any conflicts between Vue.
Read more >
Java PSequence類代碼示例- 純淨天空
INSTANCE; PersistentEntityTestDriver<BasketCommand, PEBasketEvent, ... That can be improved by implementing a smarter // merge that takes the timestamps ...
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