You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jg...@apache.org on 2017/05/18 22:21:24 UTC
kafka git commit: HOTFIX: Close transactional producers in all new
tests
Repository: kafka
Updated Branches:
refs/heads/trunk 96959bc56 -> 30736da65
HOTFIX: Close transactional producers in all new tests
Author: Apurva Mehta <ap...@confluent.io>
Reviewers: Jason Gustafson <ja...@confluent.io>
Closes #3093 from apurvam/HOTFIX-close-leaked-producers-in-transactions-test
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/30736da6
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/30736da6
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/30736da6
Branch: refs/heads/trunk
Commit: 30736da65d6e47eb68ab7563357a063caf753964
Parents: 96959bc
Author: Apurva Mehta <ap...@confluent.io>
Authored: Thu May 18 15:21:15 2017 -0700
Committer: Jason Gustafson <ja...@confluent.io>
Committed: Thu May 18 15:21:15 2017 -0700
----------------------------------------------------------------------
.../integration/kafka/api/AuthorizerIntegrationTest.scala | 1 +
.../test/scala/integration/kafka/api/TransactionsTest.scala | 8 ++++----
2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/30736da6/core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala b/core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala
index a362577..0198d38 100644
--- a/core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala
+++ b/core/src/test/scala/integration/kafka/api/AuthorizerIntegrationTest.scala
@@ -204,6 +204,7 @@ class AuthorizerIntegrationTest extends BaseRequestTest {
producers.foreach(_.close())
consumers.foreach(_.wakeup())
consumers.foreach(_.close())
+ transactionalProducer.close()
removeAllAcls()
super.tearDown()
}
http://git-wip-us.apache.org/repos/asf/kafka/blob/30736da6/core/src/test/scala/integration/kafka/api/TransactionsTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/integration/kafka/api/TransactionsTest.scala b/core/src/test/scala/integration/kafka/api/TransactionsTest.scala
index e8669e9..1832dc2 100644
--- a/core/src/test/scala/integration/kafka/api/TransactionsTest.scala
+++ b/core/src/test/scala/integration/kafka/api/TransactionsTest.scala
@@ -194,7 +194,6 @@ class TransactionsTest extends KafkaServerTestHarness {
} catch {
case e : ProducerFencedException =>
// good!
- producer1.close()
case e : Exception =>
fail("Got an unexpected exception from a fenced producer.", e)
}
@@ -207,6 +206,7 @@ class TransactionsTest extends KafkaServerTestHarness {
}
} finally {
consumer.close()
+ producer1.close()
producer2.close()
}
}
@@ -237,7 +237,6 @@ class TransactionsTest extends KafkaServerTestHarness {
} catch {
case e : ProducerFencedException =>
// good!
- producer1.close()
case e : Exception =>
fail("Got an unexpected exception from a fenced producer.", e)
}
@@ -250,6 +249,7 @@ class TransactionsTest extends KafkaServerTestHarness {
}
} finally {
consumer.close()
+ producer1.close()
producer2.close()
}
}
@@ -287,7 +287,6 @@ class TransactionsTest extends KafkaServerTestHarness {
producer1.close()
case e : ExecutionException =>
assertTrue(e.getCause.isInstanceOf[ProducerFencedException])
- producer1.close()
case e : Exception =>
fail("Got an unexpected exception from a fenced producer.", e)
}
@@ -300,6 +299,7 @@ class TransactionsTest extends KafkaServerTestHarness {
}
} finally {
consumer.close()
+ producer1.close()
producer2.close()
}
}
@@ -339,7 +339,6 @@ class TransactionsTest extends KafkaServerTestHarness {
producer1.close()
case e : ExecutionException =>
assertTrue(e.getCause.isInstanceOf[ProducerFencedException])
- producer1.close()
case e : Exception =>
fail("Got an unexpected exception from a fenced producer.", e)
}
@@ -352,6 +351,7 @@ class TransactionsTest extends KafkaServerTestHarness {
}
} finally {
consumer.close()
+ producer1.close()
producer2.close()
}
}