Skip to content

MINOR: Specify character encoding in NetworkTestUtils#5965

Merged
ijuma merged 1 commit intoapache:trunkfrom
gardnervickers:CPKAFKA-2164
Dec 8, 2018
Merged

MINOR: Specify character encoding in NetworkTestUtils#5965
ijuma merged 1 commit intoapache:trunkfrom
gardnervickers:CPKAFKA-2164

Conversation

@gardnervickers
Copy link
Copy Markdown
Contributor

This attempts to address the flaky test SaslAuthenticatorTest.testCannotReauthenticateWithDifferentPrincipal()

I was not able to reproduce locally even after 150 test runs in a loop, but given the error message:

org.junit.ComparisonFailure: expected:
<[6QBJiMZ6o5AqbNAjDTDjWtQSa4alfuUWsYKIy2tt7dz5heDaWZlz21yr8Gl4uEJkQABQXeEL0UebdpufDb5k8SvReSK6wYwQ9huP-9]> but was:<[????����????OAUTHBEARER]>

????����???? seems to mean invalid UTF-8.

This patch ensures that we specify a charset when writing out and reading in bytes. I'm not sure this fixes the problem but it seems likely.

Committer Checklist (excluded from commit message)

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

@ijuma ijuma changed the title [MINOR] Specify character encoding when writing/reading a string. MINOR: Specify character encoding when writing/reading a string. Dec 4, 2018
@ijuma ijuma changed the title MINOR: Specify character encoding when writing/reading a string. [MINOR] Specify character encoding in NetworkTestUtils Dec 4, 2018
@ijuma ijuma changed the title [MINOR] Specify character encoding in NetworkTestUtils MINOR: Specify character encoding in NetworkTestUtils Dec 4, 2018
Copy link
Copy Markdown
Member

@ijuma ijuma left a comment

Choose a reason for hiding this comment

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

LGTM

@ijuma
Copy link
Copy Markdown
Member

ijuma commented Dec 4, 2018

retest this please

@ijuma ijuma merged commit ac35ef6 into apache:trunk Dec 8, 2018
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
This attempts to address the flaky test `SaslAuthenticatorTest.testCannotReauthenticateWithDifferentPrincipal()` 

I was not able to reproduce locally even after 150 test runs in a loop, but given the error message:

```
org.junit.ComparisonFailure: expected:
<[6QBJiMZ6o5AqbNAjDTDjWtQSa4alfuUWsYKIy2tt7dz5heDaWZlz21yr8Gl4uEJkQABQXeEL0UebdpufDb5k8SvReSK6wYwQ9huP-9]> but was:<[????����????OAUTHBEARER]>
```

`????����????` seems to mean invalid UTF-8.

We now specify the charset when writing out and reading in bytes.

Reviewers: Ismael Juma <ismael@juma.me.uk>
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