Skip to content

MINOR Fix AsyncProducerTest bug that hits when logging is turned up#4450

Merged
ijuma merged 1 commit intoapache:trunkfrom
cmccabe:fix-asyncproducertest
Apr 11, 2018
Merged

MINOR Fix AsyncProducerTest bug that hits when logging is turned up#4450
ijuma merged 1 commit intoapache:trunkfrom
cmccabe:fix-asyncproducertest

Conversation

@cmccabe
Copy link
Copy Markdown
Contributor

@cmccabe cmccabe commented Jan 19, 2018

AsyncProducerTest gets an error about an incorrect mock when the logging
level is turned up. Instead of using a mock, just create a real
SyncProducerConfig object, since the object is simple to create.

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jan 19, 2018

The error message when logging is set to TRACE looks like this:

    [2018-01-19 11:42:37,266] WARN Failed to send producer request with correlation id 11 to broker 0 with data for partitions topic1-1,topic1-0 (kafka.producer.async.DefaultEventHandler:69)
    java.lang.IllegalStateException: missing behavior definition for the preceding method call:
    SyncProducerConfig.host()
    Usage is: expect(a.foo()).andXXX()
        at org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:42)
        at org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:94)
        at org.easymock.internal.ClassProxyFactory$MockMethodInterceptor.intercept(ClassProxyFactory.java:95)
        at kafka.producer.SyncProducerConfig$$EnhancerByCGLIB$$69b88809.host(<generated>)
        at kafka.producer.async.DefaultEventHandler$$anonfun$kafka$producer$async$DefaultEventHandler$$send$2.apply(DefaultEventHandler.scala:274)
        at kafka.producer.async.DefaultEventHandler$$anonfun$kafka$producer$async$DefaultEventHandler$$send$2.apply(DefaultEventHandler.scala:274)
        at kafka.utils.Logging$class.debug(Logging.scala:59)
        at kafka.producer.async.DefaultEventHandler.debug(DefaultEventHandler.scala:38)
        at kafka.producer.async.DefaultEventHandler.kafka$producer$async$DefaultEventHandler$$send(DefaultEventHandler.scala:273)
        at kafka.producer.async.DefaultEventHandler$$anonfun$dispatchSerializedData$2.apply(DefaultEventHandler.scala:116)
        at kafka.producer.async.DefaultEventHandler$$anonfun$dispatchSerializedData$2.apply(DefaultEventHandler.scala:108)
        at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:733)
        at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:130)
        at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:130)
        at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:236)
        at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:40)
        at scala.collection.mutable.HashMap.foreach(HashMap.scala:130)
        at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:732)
        at kafka.producer.async.DefaultEventHandler.dispatchSerializedData(DefaultEventHandler.scala:108)
        at kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:81)
        at kafka.producer.AsyncProducerTest.testFailedSendRetryLogic(AsyncProducerTest.scala:432)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)

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.

Thanks for the PR, LGTM.

@ijuma
Copy link
Copy Markdown
Member

ijuma commented Jan 19, 2018

retest this please

1 similar comment
@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jan 24, 2018

retest this please

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jan 24, 2018

Another Jenkins infrastructure failure (no build or testing was done):

18:58:01 ERROR: No tool found matching GRADLE_3_4_RC_2_HOME
18:58:01 Setting GRADLE_3_5_HOME=/home/jenkins/tools/gradle/3.5
18:58:01 [kafka-pr-jdk8-scala2.12] $ /bin/bash -xe /tmp/jenkins7846209012933300131.sh
18:58:01 + rm -rf /home/jenkins/jenkins-slave/workspace/kafka-pr-jdk8-scala2.12/.gradle
18:58:01 + /home/jenkins/tools/gradle/3.5/bin/gradle
18:58:01 /tmp/jenkins7846209012933300131.sh: line 4: /home/jenkins/tools/gradle/3.5/bin/gradle: No such file or directory
18:58:01 Build step 'Execute shell' marked build as failure

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jan 24, 2018

retest this please

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jan 24, 2018

I filed https://issues.apache.org/jira/browse/INFRA-15903 for the Jenkins issue. We have seen it before.

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jan 24, 2018

Another unrelated failure in org.apache.kafka.streams.integration.ResetIntegrationTest

@cmccabe cmccabe force-pushed the fix-asyncproducertest branch from f63489e to 7cd1f4a Compare January 26, 2018 18:59
@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jan 27, 2018

JDK7 failure was streams test timeout. Will retry.

00:23:45 Build timed out (after 180 minutes). Marking the build as aborted.
00:24:38 Build was aborted
00:24:38 :streams:integrationTest FAILED
00:24:38 
00:24:38 FAILURE: Build failed with an exception.
00:24:38 
00:24:38 * What went wrong:
00:24:38 Execution failed for task ':streams:integrationTest'.

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jan 27, 2018

Retest this please

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jan 29, 2018

retest this please

1 similar comment
@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Jan 31, 2018

retest this please

@asfgit
Copy link
Copy Markdown

asfgit commented Jan 31, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/kafka-pr-test-coverage/198/

@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Apr 11, 2018

retest this please

AsyncProducerTest gets an error about an incorrect mock when the logging
level is turned up.  Instead of using a mock, just create a real
SyncProducerConfig object, since the object is simple to create.
@cmccabe cmccabe force-pushed the fix-asyncproducertest branch from 7cd1f4a to b162029 Compare April 11, 2018 16:47
@cmccabe
Copy link
Copy Markdown
Contributor Author

cmccabe commented Apr 11, 2018

The test run succeeded, but then jenkins got this:

19:25:47 ERROR: Step ?Publish coverage to GitHub? aborted due to exception: 
19:25:47 java.io.IOException: Exceeded rate limit for repository
19:25:47 	at com.github.terma.jenkins.githubprcoveragestatus.GitHubPullRequestRepository.getGitHubRepository(GitHubPullRequestRepository.java:46)
19:25:47 Caused: java.io.IOException: Error while accessing rate limit API
19:25:47 	at com.github.terma.jenkins.githubprcoveragestatus.GitHubPullRequestRepository.getGitHubRepository(GitHubPullRequestRepository.java:51)

@ijuma ijuma merged commit e4d652b into apache:trunk Apr 11, 2018
koqizhao pushed a commit to koqizhao/kafka that referenced this pull request Apr 12, 2018
…pache#4450)

AsyncProducerTest gets an error about an incorrect mock when the logging
level is turned up.  Instead of usIng a mock, just create a real
SyncProducerConfig object, since the object is simple to create.

Reviewers: Ismael Juma <ismael@juma.me.uk>
koqizhao pushed a commit to koqizhao/kafka that referenced this pull request Apr 12, 2018
…pache#4450)

AsyncProducerTest gets an error about an incorrect mock when the logging
level is turned up.  Instead of usIng a mock, just create a real
SyncProducerConfig object, since the object is simple to create.

Reviewers: Ismael Juma <ismael@juma.me.uk>
koqizhao pushed a commit to koqizhao/kafka that referenced this pull request Apr 12, 2018
…pache#4450)

AsyncProducerTest gets an error about an incorrect mock when the logging
level is turned up.  Instead of usIng a mock, just create a real
SyncProducerConfig object, since the object is simple to create.

Reviewers: Ismael Juma <ismael@juma.me.uk>
ying-zheng pushed a commit to ying-zheng/kafka that referenced this pull request Jul 6, 2018
…pache#4450)

AsyncProducerTest gets an error about an incorrect mock when the logging
level is turned up.  Instead of usIng a mock, just create a real
SyncProducerConfig object, since the object is simple to create.

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.

3 participants