-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][cli] Fix expiration of tokens created with "pulsar tokens create" #22815
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
Please use a TestNG parameterized test for the test cases since they are essentially the same test case with different parameters.
Here's one example how it can be achieved with TestNG:
pulsar/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
Lines 1687 to 1688 in 47fd1a3
@Test(dataProvider = "ackReceiptEnabledAndSubscriptionTypes") | |
public void testMaxUnAckMessagesLowerThanPermits(boolean ackReceiptEnabled, SubscriptionType subType) |
pulsar/pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
Lines 199 to 207 in 47fd1a3
@DataProvider(name = "ackReceiptEnabledAndSubscriptionTypes") | |
public Object[][] ackReceiptEnabledAndSubscriptionTypes() { | |
return new Object[][] { | |
{true, SubscriptionType.Shared}, | |
{true, SubscriptionType.Key_Shared}, | |
{false, SubscriptionType.Shared}, | |
{false, SubscriptionType.Key_Shared}, | |
}; | |
} |
…seconds as milliseconds).
Thanks, @lhotari 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good work @entvex
backported to branch-3.2 with commit f1c4547 |
…e" (#22815) Co-authored-by: David Jensen <djn@danskecommodities.com>
Fixes #22811
Motivation
This fix addresses a regression caused by changes in this pull request. It’s crucial for users who rely on
bin/pulsar tokens create
for creating JWT tokens.The versions affected 3.2.0 3.2.1 3.2.2 and 3.2.3
Modifications
In this fix, I have changed it back to use seconds and added additional tests to prevent similar issues in the future.
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: