Skip to content

[improve][test] Add test case for system topic schema not compatible bug.#17992

Merged
Technoboy- merged 1 commit intoapache:masterfrom
dragonls:add-system-topic-schema-test
Oct 17, 2022
Merged

[improve][test] Add test case for system topic schema not compatible bug.#17992
Technoboy- merged 1 commit intoapache:masterfrom
dragonls:add-system-topic-schema-test

Conversation

@dragonls
Copy link
Contributor

Master Issue: #17979

Related to #17986

Motivation

Add test case to cover system topic schema compatibility.

Modifications

Add test case (org.apache.pulsar.broker.systopic.NamespaceEventsSystemTopicServiceTest#testSystemTopicSchemaCompatibility) to cover system topic schema compatibility.

The schemaCompatibilityStrategy of system topic should always be the same as the conf systemTopicSchemaCompatibilityStrategy, which is default SchemaCompatibilityStrategy.ALWAYS_COMPATIBLE.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • org.apache.pulsar.broker.systopic.NamespaceEventsSystemTopicServiceTest#testSystemTopicSchemaCompatibility

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: dragonls#2

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Oct 11, 2022
@codelipenghui
Copy link
Contributor

@dragonls I think it should also cherry-pick to branch-2.11 and branch-2.9 right?

@dragonls
Copy link
Contributor Author

@dragonls I think it should also cherry-pick to branch-2.11 and branch-2.9 right?

branch-2.11 is ok,but branch-2.9 is no need because #17986 has covered this change.

@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2022

Codecov Report

Merging #17992 (2a4fadb) into master (6c65ca0) will increase coverage by 14.45%.
The diff coverage is 58.33%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #17992       +/-   ##
=============================================
+ Coverage     34.91%   49.37%   +14.45%     
- Complexity     5707     6927     +1220     
=============================================
  Files           607      393      -214     
  Lines         53396    43422     -9974     
  Branches       5712     4462     -1250     
=============================================
+ Hits          18644    21438     +2794     
+ Misses        32119    19598    -12521     
+ Partials       2633     2386      -247     
Flag Coverage Δ
unittests 49.37% <58.33%> (+14.45%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../service/SystemTopicBasedTopicPoliciesService.java 62.97% <0.00%> (+11.38%) ⬆️
...g/apache/pulsar/compaction/CompactedTopicImpl.java 69.28% <0.00%> (+58.57%) ⬆️
...apache/pulsar/proxy/server/DirectProxyHandler.java 63.63% <50.00%> (ø)
...broker/delayed/InMemoryDelayedDeliveryTracker.java 65.00% <75.00%> (+65.00%) ⬆️
...pulsar/broker/admin/impl/PersistentTopicsBase.java 51.48% <100.00%> (+40.08%) ⬆️
...rg/apache/pulsar/broker/service/BrokerService.java 57.98% <100.00%> (+9.98%) ⬆️
...apache/pulsar/broker/service/TopicListService.java 42.62% <0.00%> (-12.30%) ⬇️
...tent/NonPersistentDispatcherMultipleConsumers.java 40.74% <0.00%> (-7.41%) ⬇️
.../apache/pulsar/broker/namespace/LookupOptions.java 87.50% <0.00%> (ø)
...pulsar/io/flume/node/EnvVarResolverProperties.java
... and 354 more

@Technoboy- Technoboy- force-pushed the add-system-topic-schema-test branch from 5f55151 to 2a4fadb Compare October 17, 2022 01:14
@Technoboy- Technoboy- merged commit 96cc240 into apache:master Oct 17, 2022
@Technoboy- Technoboy- changed the title [improve][broker] Add test case for system topic schema not compatible bug. [improve][test] Add test case for system topic schema not compatible bug. Oct 17, 2022
Technoboy- pushed a commit that referenced this pull request Oct 17, 2022
…bug. (#17992)

Co-authored-by: druidliu <druidliu@tencent.com>
@Technoboy- Technoboy- modified the milestones: 2.12.0, 2.11.0 Oct 17, 2022
liangyepianzhou pushed a commit that referenced this pull request Dec 6, 2022
…bug. (#17992)

Co-authored-by: druidliu <druidliu@tencent.com>
(cherry picked from commit 96cc240)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Dec 6, 2022
…bug. (apache#17992)

Co-authored-by: druidliu <druidliu@tencent.com>
(cherry picked from commit 96cc240)
(cherry picked from commit a585dd9)
@dragonls dragonls deleted the add-system-topic-schema-test branch December 21, 2022 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants