You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/07/25 15:34:22 UTC

[GitHub] [kafka] Gerrrr opened a new pull request, #12437: KAFKA-13769 Add tests for ForeignJoinSubscriptionProcessorSupplier

Gerrrr opened a new pull request, #12437:
URL: https://github.com/apache/kafka/pull/12437

   This PR introduces a test suite that could've caught the issue hotfixed in https://github.com/apache/kafka/pull/12420.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] Gerrrr commented on a diff in pull request #12437: KAFKA-13769 Add tests for ForeignJoinSubscriptionProcessorSupplier

Posted by GitBox <gi...@apache.org>.
Gerrrr commented on code in PR #12437:
URL: https://github.com/apache/kafka/pull/12437#discussion_r930774040


##########
streams/src/test/java/org/apache/kafka/streams/kstream/internals/foreignkeyjoin/ForeignJoinSubscriptionProcessorSupplierTest.java:
##########
@@ -0,0 +1,371 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.streams.kstream.internals.foreignkeyjoin;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.apache.kafka.streams.kstream.internals.Change;
+import org.apache.kafka.streams.kstream.internals.KTableValueGetter;
+import org.apache.kafka.streams.kstream.internals.KTableValueGetterSupplier;
+import org.apache.kafka.streams.kstream.internals.foreignkeyjoin.SubscriptionWrapper.Instruction;
+import org.apache.kafka.streams.processor.api.MockProcessorContext;
+import org.apache.kafka.streams.processor.api.MockProcessorContext.CapturedForward;
+import org.apache.kafka.streams.processor.api.Processor;
+import org.apache.kafka.streams.processor.api.ProcessorContext;
+import org.apache.kafka.streams.processor.api.Record;
+import org.apache.kafka.streams.state.ValueAndTimestamp;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ForeignJoinSubscriptionProcessorSupplierTest {

Review Comment:
   Good idea! Added:
   
   https://github.com/apache/kafka/blob/b44b119a2c4e89da24b6fe3580771e9acf03a67f/streams/src/test/java/org/apache/kafka/streams/kstream/internals/foreignkeyjoin/ForeignJoinSubscriptionProcessorSupplierTest.java#L46-L50



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] vvcephei commented on pull request #12437: KAFKA-13769 Add tests for ForeignJoinSubscriptionProcessorSupplier

Posted by GitBox <gi...@apache.org>.
vvcephei commented on PR #12437:
URL: https://github.com/apache/kafka/pull/12437#issuecomment-1197237568

   Ok, at least we got on passing build that time. The failures are again unrelated:
   ```
   [Build / PowerPC / Run PowerPC Build / org.apache.kafka.common.security.oauthbearer.secured.RefreshingHttpsJwksTest.testBasicScheduleRefresh()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12437/4/testReport/junit/org.apache.kafka.common.security.oauthbearer.secured/RefreshingHttpsJwksTest/Build___PowerPC___Run_PowerPC_Build___testBasicScheduleRefresh__/)
       [Build / JDK 17 and Scala 2.13 / org.apache.kafka.connect.integration.ConnectorRestartApiIntegrationTest.testMultiWorkerRestartOnlyConnector](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12437/4/testReport/junit/org.apache.kafka.connect.integration/ConnectorRestartApiIntegrationTest/Build___JDK_17_and_Scala_2_13___testMultiWorkerRestartOnlyConnector/)
       [Build / JDK 11 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationBaseTest.testReplication()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12437/4/testReport/junit/org.apache.kafka.connect.mirror.integration/MirrorConnectorsIntegrationBaseTest/Build___JDK_11_and_Scala_2_13___testReplication__/)
       [Build / JDK 11 and Scala 2.13 / org.apache.kafka.connect.integration.ExactlyOnceSourceIntegrationTest.testSeparateOffsetsTopic](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12437/4/testReport/junit/org.apache.kafka.connect.integration/ExactlyOnceSourceIntegrationTest/Build___JDK_11_and_Scala_2_13___testSeparateOffsetsTopic/)
       [Build / JDK 11 and Scala 2.13 / kafka.server.RaftClusterSnapshotTest.testSnapshotsGenerated()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12437/4/testReport/junit/kafka.server/RaftClusterSnapshotTest/Build___JDK_11_and_Scala_2_13___testSnapshotsGenerated__/)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] vvcephei commented on pull request #12437: KAFKA-13769 Add tests for ForeignJoinSubscriptionProcessorSupplier

Posted by GitBox <gi...@apache.org>.
vvcephei commented on PR #12437:
URL: https://github.com/apache/kafka/pull/12437#issuecomment-1196757702

   These failures are certainly unrelated, but I'm going to re-run the tests before merging, since we didn't get a single green build this time.
   
   ```
   [Build / JDK 8 and Scala 2.12 / org.apache.kafka.clients.consumer.KafkaConsumerTest.testPollReturnsRecords()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12437/3/testReport/junit/org.apache.kafka.clients.consumer/KafkaConsumerTest/Build___JDK_8_and_Scala_2_12___testPollReturnsRecords__/)
       [Build / JDK 11 and Scala 2.13 / kafka.server.DynamicBrokerReconfigurationTest.testKeyStoreAlter()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12437/3/testReport/junit/kafka.server/DynamicBrokerReconfigurationTest/Build___JDK_11_and_Scala_2_13___testKeyStoreAlter__/)
       [Build / JDK 11 and Scala 2.13 / kafka.server.DynamicBrokerReconfigurationTest.testKeyStoreAlter()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12437/3/testReport/junit/kafka.server/DynamicBrokerReconfigurationTest/Build___JDK_11_and_Scala_2_13___testKeyStoreAlter___2/)
       [Build / JDK 17 and Scala 2.13 / kafka.network.ConnectionQuotasTest.testListenerConnectionRateLimitWhenActualRateAboveLimit()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-12437/3/testReport/junit/kafka.network/ConnectionQuotasTest/Build___JDK_17_and_Scala_2_13___testListenerConnectionRateLimitWhenActualRateAboveLimit__/)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] bellemare commented on a diff in pull request #12437: KAFKA-13769 Add tests for ForeignJoinSubscriptionProcessorSupplier

Posted by GitBox <gi...@apache.org>.
bellemare commented on code in PR #12437:
URL: https://github.com/apache/kafka/pull/12437#discussion_r931078820


##########
streams/src/test/java/org/apache/kafka/streams/kstream/internals/foreignkeyjoin/ForeignJoinSubscriptionProcessorSupplierTest.java:
##########
@@ -0,0 +1,371 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.streams.kstream.internals.foreignkeyjoin;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.apache.kafka.streams.kstream.internals.Change;
+import org.apache.kafka.streams.kstream.internals.KTableValueGetter;
+import org.apache.kafka.streams.kstream.internals.KTableValueGetterSupplier;
+import org.apache.kafka.streams.kstream.internals.foreignkeyjoin.SubscriptionWrapper.Instruction;
+import org.apache.kafka.streams.processor.api.MockProcessorContext;
+import org.apache.kafka.streams.processor.api.MockProcessorContext.CapturedForward;
+import org.apache.kafka.streams.processor.api.Processor;
+import org.apache.kafka.streams.processor.api.ProcessorContext;
+import org.apache.kafka.streams.processor.api.Record;
+import org.apache.kafka.streams.state.ValueAndTimestamp;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ForeignJoinSubscriptionProcessorSupplierTest {

Review Comment:
   Smart addition :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] vvcephei commented on a diff in pull request #12437: KAFKA-13769 Add tests for ForeignJoinSubscriptionProcessorSupplier

Posted by GitBox <gi...@apache.org>.
vvcephei commented on code in PR #12437:
URL: https://github.com/apache/kafka/pull/12437#discussion_r930562541


##########
streams/src/test/java/org/apache/kafka/streams/kstream/internals/foreignkeyjoin/ForeignJoinSubscriptionProcessorSupplierTest.java:
##########
@@ -0,0 +1,371 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.kafka.streams.kstream.internals.foreignkeyjoin;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.apache.kafka.streams.kstream.internals.Change;
+import org.apache.kafka.streams.kstream.internals.KTableValueGetter;
+import org.apache.kafka.streams.kstream.internals.KTableValueGetterSupplier;
+import org.apache.kafka.streams.kstream.internals.foreignkeyjoin.SubscriptionWrapper.Instruction;
+import org.apache.kafka.streams.processor.api.MockProcessorContext;
+import org.apache.kafka.streams.processor.api.MockProcessorContext.CapturedForward;
+import org.apache.kafka.streams.processor.api.Processor;
+import org.apache.kafka.streams.processor.api.ProcessorContext;
+import org.apache.kafka.streams.processor.api.Record;
+import org.apache.kafka.streams.state.ValueAndTimestamp;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ForeignJoinSubscriptionProcessorSupplierTest {

Review Comment:
   Thanks for this.
   
   I want to make sure we don't overlook this again if we add another version. I think it should be good enough if you add another test that asserts that `SubscriptionWrapper.CURRENT_VERSION == VERSION_1`, along with a comment explaining that when we bump the version, we should also add a new set of tests. WDYT?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] vvcephei merged pull request #12437: KAFKA-13769 Add tests for ForeignJoinSubscriptionProcessorSupplier

Posted by GitBox <gi...@apache.org>.
vvcephei merged PR #12437:
URL: https://github.com/apache/kafka/pull/12437


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org