cloudstateio / cloudstate

Distributed State Management for Serverless
https://cloudstate.io
Apache License 2.0
763 stars 97 forks source link

Reorganise and extend TCK #500

Closed pvlugter closed 3 years ago

pvlugter commented 3 years ago

The last part to resolve #316. Reorganise the TCK into separate files, rather than one very long file. Add proxy tests with interceptor based on the TCK model implementations rather than shopping cart, testing gRPC and HTTP APIs. Remove the shopping cart, and disable the unimplemented TCKs, just java-support for now.

There are some things I'll follow up with after this too:

pvlugter commented 3 years ago

Updated the Go support and TCK implementation for most of the new tests in this PR and using a new cloudstate-go-tck:latest image in the integration tests now. https://github.com/cloudstateio/go-support/pull/67

pvlugter commented 3 years ago

Added the follow-ups directly to this PR:

Fixed the stream completion on passivation for CRDT entities — this was similar to a previous issue for event sourced entities, where the actor was being stopped without first completing the stream, and the stream would then fail and close ungracefully when the stream sees the actor terminate, and would also log a deadletter for the failure since the actor is already stopped; fixed by closing the stream and waiting for it to be closed before stopping the actor.

Updated the testkit interceptor expect methods from expectClient/expectService to expectIncoming/expectOutgoing as I think just using incoming/outgoing messages could be clearer than client/service, with all the other uses of client and service.

Compatible protocol version reported by the language support is now required. The Java and Go supports already do this, and are currently the only language supports tested with the TCK integration tests. There's a setting to disable the check in the proxy if needed, since the event sourced entity subprotocol is still compatible across current and previous protocol versions.

pvlugter commented 3 years ago

Since this is mainly just reorganisation and additional tests, I'll merge now. Reviews, questions, comments all still welcome of course.