@Test(expectedExceptions = RuntimeException.class, expectedExceptionsMessageRegExp = ".*Cannot create PubSub.*") public void testFailingToCreatePubSub() { BulletStormConfig config = new BulletStormConfig("src/test/resources/test_config.yaml"); config.set(BulletConfig.PUBSUB_CLASS_NAME, "fake.class"); QuerySpout spout = new QuerySpout(config); ComponentUtils.open(spout, emitter); spout.activate(); }
@BeforeMethod public void setup() { emitter = new CustomEmitter(); BulletStormConfig config = new BulletStormConfig("src/test/resources/test_config.yaml"); spout = ComponentUtils.open(new QuerySpout(config), emitter); spout.activate(); subscriber = (CustomSubscriber) spout.getSubscriber(); }
Number loopBoltMemoryOffHeapLoad = config.getAs(BulletStormConfig.LOOP_BOLT_MEMORY_OFF_HEAP_LOAD, Number.class); builder.setSpout(QUERY_COMPONENT, new QuerySpout(config), querySpoutParallelism) .setCPULoad(querySpoutCPULoad).setMemoryLoad(querySpoutMemoryOnHeapLoad, querySpoutMemoryOffHeapLoad);
Number loopBoltMemoryOffHeapLoad = config.getAs(BulletStormConfig.LOOP_BOLT_MEMORY_OFF_HEAP_LOAD, Number.class); builder.setSpout(QUERY_COMPONENT, new QuerySpout(config), querySpoutParallelism) .setCPULoad(querySpoutCPULoad).setMemoryLoad(querySpoutMemoryOnHeapLoad, querySpoutMemoryOffHeapLoad);