Skip to content

Conversation

@RobertIndie
Copy link
Member

Motivation

https://github.com/streamnative/pulsarctl/actions/runs/20480020903/job/58854597988?pr=1951#step:4:949

=== RUN   TestGetStatsCmd
    stats_test.go:56: 
        	Error Trace:	/pulsarctl/pkg/ctl/topic/stats_test.go:56
        	Error:      	Not equal: 
        	            	expected: utils.TopicStats{BacklogSize:0, MsgCounterIn:0, MsgCounterOut:0, MsgRateIn:0, MsgRateOut:0, MsgThroughputIn:0, MsgThroughputOut:0, AverageMsgSize:0, StorageSize:0, Publishers:[]utils.PublisherStats{}, Subscriptions:map[string]utils.SubscriptionStats{}, Replication:map[string]utils.ReplicatorStats{}, DeDuplicationStatus:"Disabled", TopicCreationTimeStamp:0, LastPublishTimestamp:0}
        	            	actual  : utils.TopicStats{BacklogSize:0, MsgCounterIn:0, MsgCounterOut:0, MsgRateIn:0, MsgRateOut:0, MsgThroughputIn:0, MsgThroughputOut:0, AverageMsgSize:0, StorageSize:0, Publishers:[]utils.PublisherStats{}, Subscriptions:map[string]utils.SubscriptionStats{}, Replication:map[string]utils.ReplicatorStats{}, DeDuplicationStatus:"Disabled", TopicCreationTimeStamp:1766561888050, LastPublishTimestamp:0}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -17,3 +17,3 @@
        	            	  DeDuplicationStatus: (string) (len=8) "Disabled",
        	            	- TopicCreationTimeStamp: (int64) 0,
        	            	+ TopicCreationTimeStamp: (int64) 1766561888050,
        	            	  LastPublishTimestamp: (int64) 0
        	Test:       	TestGetStatsCmd

apache/pulsar#24471 has add the new field TopicCreationtTimeStamp to the topic stats. And now the pulsarctl has adapted this change in #1948 which would make tests failed for the new pulsar version release.

Modifications

  • Fix the topic stats assertion
  • Upgrade the pulsar version in the CI

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

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

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@github-actions
Copy link

@RobertIndie:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@github-actions github-actions bot added the doc-info-missing This pr needs to mark a document option in description label Dec 24, 2025
@RobertIndie RobertIndie changed the title Fix assertion on TopiCreateTimeStamp in TestGetStatsCmd Fix assertion on TopiCreateTimeStamp Dec 24, 2025
@Technoboy- Technoboy- merged commit 7e9cbef into master Dec 24, 2025
11 checks passed
@Technoboy- Technoboy- deleted the fix-get-stats branch December 24, 2025 10:51
RobertIndie added a commit that referenced this pull request Dec 24, 2025
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.

4 participants