Package com.jointhegrid.ironcount

Source Code of com.jointhegrid.ironcount.ClassNotFoundTestIntegrationTest

package com.jointhegrid.ironcount;

import com.jointhegrid.ironcount.manager.Workload;
import com.jointhegrid.ironcount.manager.WorkloadManager;
import java.util.HashMap;
import java.util.Properties;
import org.junit.Assert;
import org.junit.Test;

public class ClassNotFoundTestIntegrationTest
        extends IronIntegrationTest {

  @Test
  public void disableWorkload(){
    Workload w = new Workload();
    w.active = true;
    w.consumerGroup = "group1";
    w.maxWorkers = 4;
    w.messageHandlerName = "bad.class.name";
    w.name = "testworkload";
    w.properties = new HashMap<String, String>();
    w.topic = topic;
    w.zkConnect = "localhost:8888";

    Properties p = new Properties();
    p.put(WorkloadManager.ZK_SERVER_LIST, "localhost:8888");
    WorkloadManager m = new WorkloadManager(p);
    m.init();

    m.applyWorkload(w);
    try {
      Thread.sleep(2000);
    } catch (InterruptedException ex) {
    }
    Assert.assertEquals(0, m.getWorkerThreads().size() );
    m.shutdown();
  }
}
TOP

Related Classes of com.jointhegrid.ironcount.ClassNotFoundTestIntegrationTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.