[ https://issues.apache.org/jira/browse/GEODE-8540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17204188#comment-17204188 ]
ASF GitHub Bot commented on GEODE-8540: --------------------------------------- demery-pivotal commented on a change in pull request #5557: URL: https://github.com/apache/geode/pull/5557#discussion_r496944207 ########## File path: geode-dunit/src/main/java/org/apache/geode/test/dunit/rules/DistributedBlackboard.java ########## @@ -0,0 +1,138 @@ +/* + * 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.geode.test.dunit.rules; + +import java.io.Serializable; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.atomic.AtomicReference; + +import org.apache.geode.test.dunit.Blackboard; +import org.apache.geode.test.dunit.DUnitBlackboard; +import org.apache.geode.test.dunit.VM; +import org.apache.geode.test.dunit.internal.InternalBlackboard; +import org.apache.geode.test.dunit.internal.InternalBlackboardImpl; + +/** + * BlackboardRule provides mailboxes and synchronization gateways for distributed tests. Review comment: DistributedBlackboard ########## File path: geode-dunit/src/distributedTest/java/org/apache/geode/test/dunit/rules/tests/DistributedBlackboardDistributedTest.java ########## @@ -0,0 +1,297 @@ +/* + * 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.geode.test.dunit.rules.tests; + +import static java.util.Arrays.asList; +import static java.util.concurrent.TimeUnit.SECONDS; +import static org.apache.geode.test.dunit.VM.getController; +import static org.apache.geode.test.dunit.VM.getVM; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.catchThrowable; + +import java.io.Serializable; +import java.util.concurrent.TimeoutException; + +import org.junit.Rule; +import org.junit.Test; + +import org.apache.geode.test.dunit.VM; +import org.apache.geode.test.dunit.rules.DistributedBlackboard; +import org.apache.geode.test.dunit.rules.DistributedRule; +import org.apache.geode.test.junit.rules.serializable.SerializableTestName; + +@SuppressWarnings({"serial", "CodeBlock2Expr"}) +public class DistributedBlackboardDistributedTest implements Serializable { + + @Rule + public DistributedRule distributedRule = new DistributedRule(); + @Rule + public DistributedBlackboard blackboard = new DistributedBlackboard(); + @Rule + public SerializableTestName testName = new SerializableTestName(); + + @Test + public void canPassDataBetweenVMs() { + VM vm0 = getVM(0); + VM vm1 = getVM(1); + + vm0.invoke("put data in mailbox", () -> blackboard.setMailbox(mailbox(), value())); + Review comment: You have no idea how much I appreciate you naming these messages. Thank you! ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Repackage DUnitBlackboard in a JUnit Rule > ----------------------------------------- > > Key: GEODE-8540 > URL: https://issues.apache.org/jira/browse/GEODE-8540 > Project: Geode > Issue Type: Wish > Components: tests > Reporter: Kirk Lund > Assignee: Kirk Lund > Priority: Major > Labels: pull-request-available > > Repackage DUnitBlackboard in a JUnit Rule -- This message was sent by Atlassian Jira (v8.3.4#803005)