mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/DEV/mward/cifs_hazelcast_conf to HEAD:
36614: ALF-13822: Renamed JGroupsKeepAliveHeartbeatReceiver. 36615: ALF-13822: renamed JGroupsKeepAliveHeartbeatSender. 36616: ALF-13822: renamed JGroupsRMICacheManagerPeerProvider. 36626: ALF-13822: renamed package from jgroups to cluster. 36642: ALF-13822: remove jgroupsChannelFactory from bootstrap-context.xml, exchange for Hazelcast. 36648: ALF-13822: remove jgroups references from RMICacheManagerPeerProvider. 36649: ALF-13822: Replaced jgroups with hazelcast in ehcache testing context. 36650: ALF-13822: Renamed ehcache test context and config so that jgroups not in name. 36651: ALF-13822: renamed jgroups package to ehcache. 36652: ALF-13822: Fix broken test from XML file renames. 36653: ALF-13822: rename file so that it doesn't have jgroups in the name. 36667: ALF-13822: removed some commented out jgroups code. 36679: ALF-13822: reimplemented membership change logging for KeepAliveHeartbeatReceiver. 36680: ALF-13822: remove redundant JGroups properties from clusterPropertySetter 36681: ALF-13822: remove redundant properties from repository.properties. 36682: ALF-13822: remove jgroups configuration files. 36683: ALF-13822: remove jgroups messenger abstraction classes. 36684: ALF-13822: removed jgroups test XML 36685: ALF-13822: remove AlfrescoJGroupsChannelFactory. 36686: ALF-13822: updated comment to include word hazelcast rather than jgroups. 36687: ALF-13822: removed jgroups from comment 36688: ALF-13822: removed jgroups from comment 36689: ALF-13822: removed jgroups comment as no longer relavent 36697: ALF-13822: removed jgroups from ant build files. 36704: ALF-13822: removed jgroups libraries. 36707: ALF-13822: removed jgroups source zip. 36708: ALF-13822: removed jgroups form installer license file. 36710: ALF-13822: removed jgroups lib from 3rd-party eclipse project's classpath. 36731: ALF-13822: removed mentions of jgroups from JLAN. 36761: ALF-13822: fixed hazelcast TCP config - removed ever-present loopback interface. 36762: ALF-13822: improved logging of KeepAliveHeartbeatReceiver and added toString() for HazelcastMessenger. 36990: ALF-13822: fixed AWS placeholder properties and added interface binding properties. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@37008 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -29,8 +29,6 @@ import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
import com.hazelcast.config.Config;
|
||||
import com.hazelcast.config.GroupConfig;
|
||||
import com.hazelcast.core.Hazelcast;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.core.ITopic;
|
||||
@@ -46,6 +44,8 @@ public class HazelcastTest implements MessageListener<String>
|
||||
{
|
||||
private static ApplicationContext ctx;
|
||||
private MessengerTestHelper helper;
|
||||
private HazelcastInstanceFactory hiFactory;
|
||||
private HazelcastInstance hi;
|
||||
|
||||
@BeforeClass
|
||||
public static void setUpClass()
|
||||
@@ -65,14 +65,14 @@ public class HazelcastTest implements MessageListener<String>
|
||||
public void setUp()
|
||||
{
|
||||
helper = new MessengerTestHelper();
|
||||
hiFactory = ctx.getBean(HazelcastInstanceFactory.class);
|
||||
hi = hiFactory.getInstance();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void canSendWithHazelcastMessengerFactory() throws InterruptedException
|
||||
{
|
||||
Config config = createConfig();
|
||||
HazelcastInstance hi = Hazelcast.newHazelcastInstance(config);
|
||||
ITopic<String> topic = hi.getTopic("testregion");
|
||||
|
||||
topic.addMessageListener(this);
|
||||
@@ -93,8 +93,6 @@ public class HazelcastTest implements MessageListener<String>
|
||||
TestMessageReceiver r1 = new TestMessageReceiver();
|
||||
m1.setReceiver(r1);
|
||||
|
||||
Config config = createConfig();
|
||||
HazelcastInstance hi = Hazelcast.newHazelcastInstance(config);
|
||||
ITopic<String> topic2 = hi.getTopic("testregion");
|
||||
String address2 = hi.getCluster().getLocalMember().getInetSocketAddress().toString();
|
||||
Messenger<String> m2 = new HazelcastMessenger<String>(topic2, address2);
|
||||
@@ -112,14 +110,4 @@ public class HazelcastTest implements MessageListener<String>
|
||||
{
|
||||
helper.setReceivedMsg(message);
|
||||
}
|
||||
|
||||
private Config createConfig()
|
||||
{
|
||||
Config config = new Config();
|
||||
GroupConfig groupConfig = new GroupConfig();
|
||||
groupConfig.setName("testcluster");
|
||||
groupConfig.setPassword("secret");
|
||||
config.setGroupConfig(groupConfig);
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user