Skip to content

Flaky Tests: AdminApiSchemaTest#testSchemaInfoApi - #12461

Merged
merlimat merged 1 commit into
apache:masterfrom
nicoloboschi:tests/admin-api-schema-err-flaky
Nov 11, 2021
Merged

Flaky Tests: AdminApiSchemaTest#testSchemaInfoApi#12461
merlimat merged 1 commit into
apache:masterfrom
nicoloboschi:tests/admin-api-schema-err-flaky

Conversation

@nicoloboschi

@nicoloboschi nicoloboschi commented Oct 22, 2021

Copy link
Copy Markdown
Contributor

Motivation

I see AdminApiSchemaTest#testSchemaInfoApi failing in this way:

2021-10-22T01:01:52,307+0000 [jersey-client-async-executor-5] WARN  org.apache.pulsar.client.admin.internal.BaseResource - [http://localhost:38587/admin/v2/schemas/schematest/test/test-INT32/schema] Failed to perform http post request: java.util.concurrent.CompletionException: org.apache.pulsar.client.admin.internal.http.AsyncHttpConnector$RetryException: Could not complete the operation. Number of retries has been exhausted. Failed reason: Null key for a Map not allowed in JSON (use a converting NullKeySerializer?) (through reference chain: org.apache.pulsar.common.protocol.schema.PostSchemaPayload["properties"]->java.util.HashMap["null"])

It only fails with INT32 default shema.
I found another test (SchemaTest#testNullKeyValueProperty) which sets a null-key property to INT32 instance; so if it runs before, it makes AdminApiSchemaTest#testSchemaInfoApi fail.

Modifications

Changed the SchemaTest#testNullKeyValueProperty test in order to leave the default INT32 implementation unchanged.

Alternatively, I could made the properties field final, at least for defaults SchemaInfos but this would result in a breaking change.

This change is a trivial rework / code cleanup without any test coverage.

Documentation

Check the box below and label this PR (if you have committer privilege).

Need to update docs?

  • no-need-doc

@eolivelli eolivelli added the doc-not-needed Your PR changes do not impact docs label Oct 22, 2021
@nicoloboschi

Copy link
Copy Markdown
Contributor Author

@eolivelli @lhotari @merlimat PTAL

@eolivelli eolivelli left a comment

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.

LGTM

@nicoloboschi

Copy link
Copy Markdown
Contributor Author

@lhotari @codelipenghui PTAL

@merlimat
merlimat merged commit b533fe5 into apache:master Nov 11, 2021
@merlimat merlimat added this to the 2.10.0 milestone Nov 11, 2021
eolivelli pushed a commit to eolivelli/pulsar that referenced this pull request Nov 29, 2021
nicoloboschi added a commit to datastax/pulsar that referenced this pull request Jan 31, 2022
nicoloboschi added a commit to datastax/pulsar that referenced this pull request Feb 28, 2022
(cherry picked from commit b533fe5)
(cherry picked from commit 504995e)
michaeljmarshall pushed a commit that referenced this pull request Mar 7, 2022
* [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi

* use custom json schema

* remove old comment

### Motivation
This is the same fix applied here #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`
michaeljmarshall pushed a commit that referenced this pull request Mar 7, 2022
michaeljmarshall pushed a commit that referenced this pull request Mar 7, 2022
* [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi

* use custom json schema

* remove old comment

### Motivation
This is the same fix applied here #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)
@michaeljmarshall michaeljmarshall added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Mar 7, 2022
michaeljmarshall pushed a commit that referenced this pull request Mar 7, 2022
* [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi

* use custom json schema

* remove old comment

### Motivation
This is the same fix applied here #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)
michaeljmarshall pushed a commit that referenced this pull request Mar 7, 2022
michaeljmarshall pushed a commit that referenced this pull request Mar 7, 2022
* [flaky-tests] AdminApiSchemaTest#testSchemaInfoApi

* use custom json schema

* remove old comment

### Motivation
This is the same fix applied here #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)
@michaeljmarshall michaeljmarshall added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Mar 7, 2022
nicoloboschi added a commit to datastax/pulsar that referenced this pull request Mar 7, 2022
* [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)
(cherry picked from commit 0f72a4f)
nicoloboschi added a commit to datastax/pulsar that referenced this pull request Mar 7, 2022
* [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)
(cherry picked from commit 0f72a4f)
gaozhangmin pushed a commit to gaozhangmin/pulsar that referenced this pull request Mar 8, 2022
* [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`
Nicklee007 pushed a commit to Nicklee007/pulsar that referenced this pull request Apr 20, 2022
* [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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test cherry-picked/branch-2.8 Archived: 2.8 is end of life cherry-picked/branch-2.9 Archived: 2.9 is end of life doc-not-needed Your PR changes do not impact docs type/flaky-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants