MINOR: Fix assertion in testCreatePermissionMetadataRequestAutoCreate (#7864)

Since `retry` expects a `by name` parameter, passing a nullary function
causes assertion failures to be ignored. I verified this by introducing
a failing assertion before/after the fix.

I checked other `retry` usages and they looked correct.

Reviewers: Manikumar Reddy <manikumar.reddy@gmail.com>
This commit is contained in:
Ismael Juma 2020-01-08 03:11:16 -08:00 committed by GitHub
parent 1adf0ee889
commit 98d36fa54e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1052,10 +1052,10 @@ class AuthorizerIntegrationTest extends BaseRequestTest {
addAndVerifyAcls(createAcls, createTopicResource)
// retry as topic being created can have MetadataResponse with Errors.LEADER_NOT_AVAILABLE
TestUtils.retry(JTestUtils.DEFAULT_MAX_WAIT_MS)(() => {
TestUtils.retry(JTestUtils.DEFAULT_MAX_WAIT_MS) {
val metadataResponse = connectAndReceive[MetadataResponse](metadataRequest)
assertEquals(Set(topic, createTopic).asJava, metadataResponse.topicsByError(Errors.NONE))
})
}
}
@Test(expected = classOf[AuthorizationException])