@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();
  }
 @BeforeClass
 public static void init() {
   server = Hazelcast.newHazelcastInstance();
   hz = HazelcastClient.newHazelcastClient(null);
   s = hz.getSemaphore(name);
 }