protected void doSetUp() throws Exception { super.doSetUp(); parser = new SimpleFilenameParser(); adapter = new DefaultMessageAdapter("hello"); adapter.setProperty("foo", "bar"); adapter.setProperty(FileConnector.PROPERTY_ORIGINAL_FILENAME, "originalName"); adapter.setProperty(FileConnector.PROPERTY_FILENAME, "newName"); }
// @Override protected void doSetUp() throws Exception { super.doSetUp(); // allow 1 active & 1 queued Thread executor = new ThreadPoolExecutor(1, 1, 10000L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue(1)); executor.prestartAllCoreThreads(); // the lock must be fair to guarantee FIFO access to the executor; // 'synchronized' on a monitor is not good enough. executorLock = new ReentrantLock(true); // this is a Threadgroup that collects uncaught exceptions. Necessary for JDK // 1.4.x only. threadGroup = new ExceptionCollectingThreadGroup(); // reset counter of active SleepyTasks SleepyTask.activeTasks.set(0); }
// @Override protected void doSetUp() throws Exception { super.doSetUp(); context = new ClassPathXmlApplicationContext(getConfigResources()); eventCounter1 = new AtomicInteger(0); eventCounter2 = new AtomicInteger(0); }