Skip to content
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

samples: Schema evolution #1499

Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3c6897c
samples: schema evolution
kamalaboulhosn Jan 23, 2023
7ea48d9
samples: schema evolution
kamalaboulhosn Jan 23, 2023
3438da5
Merge branch 'googleapis:main' into master
kamalaboulhosn Jan 23, 2023
4e5c026
Format fixes
kamalaboulhosn Jan 23, 2023
032a92f
Merge branch 'master' of https://github.com/kamalaboulhosn/java-pubsub
kamalaboulhosn Jan 23, 2023
8a81408
Fix documentation for field.
kamalaboulhosn Jan 23, 2023
90800ac
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 26, 2023
a88377c
Add back in working asserts
kamalaboulhosn Jan 26, 2023
6a741ea
Merge branch 'master' of https://github.com/kamalaboulhosn/java-pubsub
kamalaboulhosn Jan 26, 2023
9a07bbd
Formatting fixes
kamalaboulhosn Jan 26, 2023
df27d57
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 30, 2023
7d1c561
Version/delete fixes
kamalaboulhosn Feb 14, 2023
d917065
Merge branch 'master' of https://github.com/kamalaboulhosn/java-pubsub
kamalaboulhosn Feb 14, 2023
646afa7
samples: schema evolution
kamalaboulhosn Jan 23, 2023
e0cce5a
samples: schema evolution
kamalaboulhosn Jan 23, 2023
51deeb0
Format fixes
kamalaboulhosn Jan 23, 2023
a53b564
Fix documentation for field.
kamalaboulhosn Jan 23, 2023
f1224e6
Add back in working asserts
kamalaboulhosn Jan 26, 2023
de55b05
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] Jan 26, 2023
503339f
Formatting fixes
kamalaboulhosn Jan 26, 2023
cbd910c
Version/delete fixes
kamalaboulhosn Feb 14, 2023
7d15680
Merge branch 'master' of https://github.com/kamalaboulhosn/java-pubsub
kamalaboulhosn Feb 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add back in working asserts
kamalaboulhosn committed Jan 26, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit a88377cd0218ba131501a28b32b9d89c5003b1be
12 changes: 5 additions & 7 deletions samples/snippets/src/test/java/pubsub/SchemaIT.java
Original file line number Diff line number Diff line change
@@ -168,7 +168,7 @@ public void testSchema() throws Exception {
CommitAvroSchemaExample.commitAvroSchemaExample(
projectId, avroSchemaId, absoluteAvscRevisionFilePath);
assertThat(bout.toString()).contains("Committed a schema using an Avro schema:");
// ADD BACK ONCE FIXED assertThat(bout.toString()).contains(avroSchemaName.toString());
assertThat(bout.toString()).contains(avroSchemaName.toString());

bout.reset();
// Test creating Proto schema.
@@ -184,7 +184,7 @@ public void testSchema() throws Exception {
CommitProtoSchemaExample.commitProtoSchemaExample(
projectId, protoSchemaId, absoluteProtoRevisionFilePath);
assertThat(bout.toString()).contains("Committed a schema using a protobuf schema:");
// ADD BACK ONCE FIXED assertThat(bout.toString()).contains(protoSchemaName.toString());
assertThat(bout.toString()).contains(protoSchemaName.toString());

bout.reset();
// Test rolling back a schema.
@@ -193,7 +193,7 @@ public void testSchema() throws Exception {
protoSchemaId + "@" + protoSchema.getRevisionId(),
protoSchemaRevision.getRevisionId());
assertThat(bout.toString()).contains("Rolled back a schema:");
// ADD BACK ONCE FIXED assertThat(bout.toString()).contains(protoSchemaName.toString());
assertThat(bout.toString()).contains(protoSchemaName.toString());

bout.reset();
// Test getting a schema.
@@ -278,13 +278,11 @@ public void testSchema() throws Exception {

bout.reset();
// Test updating a topic schema settings
CreateTopicWithSchemaRevisionsExample.createTopicWithSchemaRevisionsExample(
UpdateTopicSchemaExample.updateTopicSchemaExample(
projectId,
protoTopicWithRevisionsId,
protoSchemaId,
protoSchemaRevision.getRevisionId(),
protoSchemaRevision.getRevisionId(),
Encoding.BINARY);
protoSchemaRevision.getRevisionId());
assertThat(bout.toString())
.contains("Updated topic with schema: " + protoTopicWithRevisionsName.toString());