Skip to content

KAFKA-16671: enable test for ensureInternalEndpointIsSecured#15868

Merged
chia7712 merged 1 commit intoapache:trunkfrom
FrankYang0529:minor-test-ensureInternalEndpointIsSecured
May 15, 2024
Merged

KAFKA-16671: enable test for ensureInternalEndpointIsSecured#15868
chia7712 merged 1 commit intoapache:trunkfrom
FrankYang0529:minor-test-ensureInternalEndpointIsSecured

Conversation

@FrankYang0529
Copy link
Copy Markdown
Member

@FrankYang0529 FrankYang0529 commented May 6, 2024

Related JIRA: https://issues.apache.org/jira/browse/KAFKA-16671

Enable the test to see error message. If there is any error, I will close this PR and investigate how to fix. If not, I will change the title to KAFKA-16671.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@chia7712
Copy link
Copy Markdown
Member

chia7712 commented May 6, 2024

@FrankYang0529 please fix the build error

@FrankYang0529 FrankYang0529 force-pushed the minor-test-ensureInternalEndpointIsSecured branch from 0cd6988 to bf427fc Compare May 7, 2024 15:01
);
assertEquals(
FORBIDDEN.getStatusCode(),
SERVICE_UNAVAILABLE.getStatusCode(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you share the details with me?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, if the connector is not started, there is no sessionKey.

} else if (sessionKey == null) {
requestValidationError = new ConnectRestException(
Response.Status.SERVICE_UNAVAILABLE,
"This worker is still starting up and has not been able to read a session key from the config topic yet"
);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added in #11783.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI can't pass. Not sure whether there is some connector forgot to close. The error is:

java.lang.AssertionError: expected:<503> but was:<403>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:647)
	at org.junit.Assert.assertEquals(Assert.java:633)
	at org.apache.kafka.connect.integration.SessionedProtocolIntegrationTest.ensureInternalEndpointIsSecured(SessionedProtocolIntegrationTest.java:118)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

503 is a temporary error, because the worker is still in starting. Could you please add a wait to check the 503 first ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added it and ensureInternalEndpointIsSecured can pass in CI environment. Thanks.

@FrankYang0529 FrankYang0529 force-pushed the minor-test-ensureInternalEndpointIsSecured branch 2 times, most recently from 3b6345f to 8ea2054 Compare May 11, 2024 15:59
@FrankYang0529 FrankYang0529 changed the title MINOR: enable test for ensureInternalEndpointIsSecured KAFKA-16671: enable test for ensureInternalEndpointIsSecured May 12, 2024
@FrankYang0529 FrankYang0529 marked this pull request as ready for review May 12, 2024 02:34
@FrankYang0529 FrankYang0529 force-pushed the minor-test-ensureInternalEndpointIsSecured branch 2 times, most recently from c8528eb to 71282b7 Compare May 13, 2024 16:19
assertEquals(
BAD_REQUEST.getStatusCode(),
connect.requestPost(connectorTasksEndpoint, "[]", emptyHeaders).getStatus()
BAD_REQUEST.getStatusCode(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert those unrelated changes

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert it. Thanks.

Signed-off-by: PoAn Yang <payang@apache.org>
@FrankYang0529 FrankYang0529 force-pushed the minor-test-ensureInternalEndpointIsSecured branch from 71282b7 to e0f1fba Compare May 14, 2024 15:54
@chia7712 chia7712 merged commit 7453549 into apache:trunk May 15, 2024
@FrankYang0529 FrankYang0529 deleted the minor-test-ensureInternalEndpointIsSecured branch May 15, 2024 06:20
TaiJuWu pushed a commit to TaiJuWu/kafka that referenced this pull request Jun 8, 2024
gongxuanzhang pushed a commit to gongxuanzhang/kafka that referenced this pull request Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants