ci: add test for pub/sub type #77
Merged
Conversation
Contributor
grant
commented
Jul 7, 2021
|
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
|
One nit, but otherwise fine. |
|
|
||
| public class MessagePublishedDataTest { | ||
| private String decode(String data) { | ||
| return new String(Base64.getDecoder().decode(data)); |
jskeet
Jul 13, 2021
This uses the platform-default character encoding. It would be better to use a specific encoding, even if we're expecting it to always be ASCII data, e.g. passing in StandardCharsets.UTF_8 as a second argument.
This uses the platform-default character encoding. It would be better to use a specific encoding, even if we're expecting it to always be ASCII data, e.g. passing in StandardCharsets.UTF_8 as a second argument.
|
|
||
| @Test | ||
| public void testPubSubEvent() { | ||
| final String json = "{\n" + |
jskeet
Jul 13, 2021
I suspect we'll want to put these into files in the longer term, but I'm fine with it being like this for now.
I suspect we'll want to put these into files in the longer term, but I'm fine with it being like this for now.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.