-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds a read-side processor to shopping-cart (Java) #60
Conversation
I don't think this should be demoed in this sample app. We should keep the scope of shopping-cart as small as possible. |
...-cart-java/shopping-cart/src/main/java/com/example/shoppingcart/impl/ShoppingCartEntity.java
Show resolved
Hide resolved
...g-cart-java/shopping-cart/src/main/java/com/example/shoppingcart/impl/ShoppingCartEvent.java
Outdated
Show resolved
Hide resolved
...ng-cart-java/shopping-cart/src/main/java/com/example/shoppingcart/impl/ReportRepository.java
Outdated
Show resolved
Hide resolved
995d8c4
to
6a7b7ef
Compare
7b38cce
to
e0da979
Compare
I will do it |
e0da979
to
8c46205
Compare
cbc4eaa
to
bfc132b
Compare
The tests are still flaky and won't improve unless we fix lagom/lagom#2140. |
...t-java/shopping-cart/src/test/java/com/example/shoppingcart/impl/ShoppingCartReportTest.java
Outdated
Show resolved
Hide resolved
Tests will only work properly after lagom/lagom#2140 is fixed
d993f3d
to
b7613c6
Compare
lagom/lagom#2140 is fixed and backported to 1.5.x This branch is now using Lagom 1.5.3 which has the fix. It should now pass all the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@renatocaval made two small commits.
LGTM.
@renatocaval build breaks are legit:
The database tables aren't being created when running the tests. |
@@ -56,8 +56,6 @@ public static void afterAll() { | |||
public void createAReportOnFirstEvent() throws InterruptedException, ExecutionException, TimeoutException { | |||
|
|||
String cartId = UUID.randomUUID().toString(); | |||
assertNull(Await.result(reportRepository.findById(cartId))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of assertions was causing the build to eventually fail. When we reach that line, it's possible that the read-side processor didn't get a chance to create the user tables and then it will fail on executing this selection.
I'm removing it because it's not strictly necessary for the tests. However, we need to rethink the test driver. Users can easily run into that situation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened an issue to address this.
lagom/lagom#2248
TODOS:
json format for dateCurrently displaying...