Skip to content

docs: Add Quickstart for Views#601

Merged
patriknw merged 7 commits intomainfrom
wip-qs-views-patriknw
Oct 15, 2021
Merged

docs: Add Quickstart for Views#601
patriknw merged 7 commits intomainfrom
wip-qs-views-patriknw

Conversation

@patriknw
Copy link
Copy Markdown
Contributor

@patriknw patriknw commented Oct 11, 2021

  • also Remove view and update integration test in java-customer-registry-quickstart

Ready for review, but keeping as draft until I have written the text content

Refs https://github.com/lightbend/akkaserverless-docs/issues/812

// end::declarations[]
// tag::name[]
service CustomerByName {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my intention is to have two steps in the tutorial, first describing the CustomerByEmail, which has transform_updates=false and automatically stores the domain.CustomerState. Second step is introducing CustomerByName with transform_updates=true and storing a different CustomerViewState


// // the view is eventually updated
await().atMost(10, SECONDS).until(() -> viewClient.getCustomer(req).toCompletableFuture()
.get(3, SECONDS).getCustomerId().equals(id));
Copy link
Copy Markdown
Contributor Author

@patriknw patriknw Oct 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using Awaitility for the "eventually" condition

.get(3, SECONDS).size() == 2);

List<CustomerViewModel.CustomerViewState> result = viewClient.getCustomers(req).runWith(Sink.seq(), testkit.getActorSystem()).toCompletableFuture()
.get(5, SECONDS);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this becomes rather low level, but integration tests are not described in the Quickstart

@patriknw
Copy link
Copy Markdown
Contributor Author

@patriknw patriknw marked this pull request as ready for review October 12, 2021 09:30
@patriknw
Copy link
Copy Markdown
Contributor Author

Integration tests here should also be updated to use getGrpcClient from #606

Copy link
Copy Markdown
Contributor

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to separate this out from the java-customer-registry-quickstart as well 👍

@@ -0,0 +1,85 @@
# Quickstart project: Customer Registry

# TODO update for quickstart instructions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still TODO?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what that refers to. I'll remove all such.

@patriknw patriknw force-pushed the wip-qs-views-patriknw branch from e79d127 to 48effe0 Compare October 15, 2021 09:34
@patriknw
Copy link
Copy Markdown
Contributor Author

updated integration tests for the quickstarts

@patriknw patriknw merged commit 1671c3d into main Oct 15, 2021
@patriknw patriknw deleted the wip-qs-views-patriknw branch October 15, 2021 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants