Skip to content

Commit

Permalink
[flaky-tests] AdminApiSchemaTest#testSchemaInfoApi (apache#14508)
Browse files Browse the repository at this point in the history
* [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi

* use custom json schema

* remove old comment

### Motivation
This is the same fix applied here apache#12461. The problem with the other pull is that the `AbstractSchema#clone()` method does return the same instance, so the fix is not useful at all.

I see this test also failing in 2.8 and 2.9 branch, I recommend to cherry-pick it.

### Modifications
* Create a new INT schema for the test purpose

- [x] `no-need-doc`

(cherry picked from commit 32c3cd1)
  • Loading branch information
nicoloboschi authored and michaeljmarshall committed Mar 7, 2022
1 parent c773179 commit 0f72a4f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,7 @@ public void testNullKeyValueProperty() throws PulsarAdminException, PulsarClient
map.put("key", null);
map.put(null, "value"); // null key is not allowed for JSON, it's only for test here

// leave INT32 instance unchanged
final Schema<Integer> integerSchema = Schema.INT32.clone();
final Schema<Integer> integerSchema = Schema.JSON(Integer.class);
((SchemaInfoImpl) integerSchema.getSchemaInfo()).setProperties(map);

final Consumer<Integer> consumer = pulsarClient.newConsumer(integerSchema).topic(topic)
Expand Down

0 comments on commit 0f72a4f

Please sign in to comment.