[jboss-svn-commits] JBL Code SVN: r6953 - labs/jbossesb/workspace/b_georges/qa/junit/src/org/jboss/soa/esb/listeners

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Oct 20 09:38:18 EDT 2006


Author: b_georges
Date: 2006-10-20 09:38:16 -0400 (Fri, 20 Oct 2006)
New Revision: 6953

Modified:
   labs/jbossesb/workspace/b_georges/qa/junit/src/org/jboss/soa/esb/listeners/RemoteDirectoryPollerTest.java
Log:
essage

Modified: labs/jbossesb/workspace/b_georges/qa/junit/src/org/jboss/soa/esb/listeners/RemoteDirectoryPollerTest.java
===================================================================
--- labs/jbossesb/workspace/b_georges/qa/junit/src/org/jboss/soa/esb/listeners/RemoteDirectoryPollerTest.java	2006-10-20 13:32:56 UTC (rev 6952)
+++ labs/jbossesb/workspace/b_georges/qa/junit/src/org/jboss/soa/esb/listeners/RemoteDirectoryPollerTest.java	2006-10-20 13:38:16 UTC (rev 6953)
@@ -27,7 +27,7 @@
 
 	private ListenersManagerExecThread listenersMgr;
 
-	File inputDir, inputDoneDir, copiedTo;
+	File getDir, putDir;
 
 	/**
 	 * @throws java.lang.Exception
@@ -35,41 +35,21 @@
 	public void setUp() throws Exception {
 		log.debug("====== setUp ==========");
 		// Create the directories required by the test...
-		inputDir = FileUtils.createTestDir("inputDir");
-		inputDoneDir = FileUtils.createTestDir("inputDoneDir");
-		copiedTo = FileUtils.createTestDir("copiedTo");
+		getDir = FileUtils.createTestDir("getDir");
+		putDir = FileUtils.createTestDir("putdir");
 
 		// Start the listener...
 		listenersMgr = ListenerUtils.startListeners(ClassUtils
 				.toResourcePath(getClass().getPackage())
 				+ "/RemoteDirectoryPollerConfig1.xml");
-		//listenersMgr.
 	}
 
 
 	public void test() throws InterruptedException {
-		// Write the input file...
-		FileUtils.writeDataToFile(new File(inputDir, "infile1.inp"), "Great goal by Maradona!!".getBytes());
-		// Make sure the input gets processed to the "inputDoneDir"
-		FileUtils.assertFileExists(new File(inputDoneDir, "infile1.inp.DONE"), 10000);
-		// Make sure the input gets removed from the "inputDir"...
-		FileUtils.assertFileDoesntExists(new File(inputDir, "infile1.inp"), 10000);
-		// Make sure the notifications appear in the "copiedTo" dir...
-		FileUtils.assertFileExists(new File(copiedTo, "infile1.inp.outFromFirst"), 10000);
-		FileUtils.assertFileExists(new File(copiedTo, "infile1.inp.outFromSecond"), 10000);
-
-		// Make sure there's no open file handles on the files created/copied by the ESB...
-		FileUtils.assertCanDelete(new File(inputDoneDir, "infile1.inp.DONE"), 10000);
-		FileUtils.assertCanDelete(new File(copiedTo, "infile1.inp.outFromFirst"), 10000);
-		FileUtils.assertCanDelete(new File(copiedTo, "infile1.inp.outFromSecond"), 10000);
-		
-		// There should have been no exceptions...
-		listenersMgr.assertNotInException();
-
-		// Send a Shutdown message to the command queue...
-		JMSClientUtil.sendMessageToQueue("shutdown", JMSClientUtil.QUEUE.A, new KeyValuePair[] {new KeyValuePair("gpMsgSelector", "test")});
-		// Make sure the Shutdown was successful...
-		listenersMgr.assertShutdownOK(10000);
+		log.debug("====== test ==========");
+		// put a file to the SFTP Server
+		// get the file from the SFTP Server
+		// the rest can be processed by the DirectoryPoller
 	}
 	
 	/**
@@ -86,9 +66,8 @@
 	 */
 	public void tearDown() throws Exception {
 		log.debug("====== tearDown ==========");
-		FileUtils.assertCanDelete(inputDir, 10000);
-		FileUtils.assertCanDelete(inputDoneDir, 10000);
-		FileUtils.assertCanDelete(copiedTo, 10000);
+		FileUtils.assertCanDelete(getDir, 10000);
+		FileUtils.assertCanDelete(putDir, 10000);
 	}
 
 	




More information about the jboss-svn-commits mailing list