コード例 #1
0
 @Test
 public void testDisablingSystemLogs() throws Exception {
   Config config = new Config();
   config.setProperty(GroupProperties.PROP_SYSTEM_LOG_ENABLED, "true");
   config.getGroupConfig().setName("testDisablingSystemLogs");
   HazelcastInstance instance = Hazelcast.newHazelcastInstance(config);
   HazelcastInstance instance2 = Hazelcast.newHazelcastInstance(config);
   instance.getMap("map").put("key", "value");
   Node node = TestUtil.getNode(instance);
   assertTrue(node.getSystemLogService().getLogBundle().size() > 0);
   Hazelcast.shutdownAll();
   config.setProperty(GroupProperties.PROP_SYSTEM_LOG_ENABLED, "false");
   instance = Hazelcast.newHazelcastInstance(config);
   instance2 = Hazelcast.newHazelcastInstance(config);
   instance.getMap("map").put("key2", "value2");
   assertTrue(node.getSystemLogService().getLogBundle().size() == 0);
 }
コード例 #2
0
  @BeforeClass
  public static void init() {
    Config config = new Config();

    QueueConfig queueConfig = config.getQueueConfig(queueForTestQueueWithSizeLimit);
    queueConfig.setMaxSize(maxSizeForQueue);

    queueConfig = config.getQueueConfig(queueForTestOfferPoll);
    queueConfig.setMaxSize(maxSizeForQueue);

    server = Hazelcast.newHazelcastInstance(config);
    client = HazelcastClient.newHazelcastClient();
  }
コード例 #3
0
 @BeforeClass
 @AfterClass
 public static void init() throws Exception {
   System.setProperty(GroupProperties.PROP_VERSION_CHECK_ENABLED, "false");
   Hazelcast.shutdownAll();
 }
コード例 #4
0
 @AfterClass
 public static void destroy() {
   HazelcastClient.shutdownAll();
   Hazelcast.shutdownAll();
 }
コード例 #5
0
 @AfterClass
 public static void destroy() {
   hz.getLifecycleService().shutdown();
   Hazelcast.shutdownAll();
 }
コード例 #6
0
 @BeforeClass
 public static void init() {
   server = Hazelcast.newHazelcastInstance();
   hz = HazelcastClient.newHazelcastClient(null);
   s = hz.getSemaphore(name);
 }