You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2016/05/31 01:00:03 UTC

[3/3] incubator-taverna-commandline git commit: TAVERNA-972 Disable unused database-related options

TAVERNA-972 Disable unused database-related options


Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/commit/c62b5407
Tree: http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/tree/c62b5407
Diff: http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/diff/c62b5407

Branch: refs/heads/master
Commit: c62b5407209bd7ae0d07889c386df0d89910cd88
Parents: 87106dd
Author: Stian Soiland-Reyes <st...@apache.org>
Authored: Tue May 31 01:45:14 2016 +0100
Committer: Stian Soiland-Reyes <st...@apache.org>
Committed: Tue May 31 01:52:04 2016 +0100

----------------------------------------------------------------------
 .../commandline/CommandLineOptionsImpl.java       | 18 +++++++-----------
 .../TestCommandLineOptionsHandler.java            | 17 ++++++++++++++++-
 2 files changed, 23 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/c62b5407/taverna-commandline-launcher/src/main/java/org/apache/taverna/commandline/CommandLineOptionsImpl.java
----------------------------------------------------------------------
diff --git a/taverna-commandline-launcher/src/main/java/org/apache/taverna/commandline/CommandLineOptionsImpl.java b/taverna-commandline-launcher/src/main/java/org/apache/taverna/commandline/CommandLineOptionsImpl.java
index 78c1863..12ee880 100644
--- a/taverna-commandline-launcher/src/main/java/org/apache/taverna/commandline/CommandLineOptionsImpl.java
+++ b/taverna-commandline-launcher/src/main/java/org/apache/taverna/commandline/CommandLineOptionsImpl.java
@@ -76,9 +76,6 @@ public class CommandLineOptionsImpl implements CommandLineOptions {
 				&& !(hasOption("embedded") || hasOption("clientserver") || hasOption("dbproperties")))
 			throw new InvalidOptionException(
 					"You should be running with a database to use provenance");
-		if (isProvenanceEnabled() && hasOption("inmemory"))
-			throw new InvalidOptionException(
-					"You should be running with a database to use provenance");
 		if ((hasOption("inputfile") || hasOption("inputvalue"))
 				&& hasOption("inputdoc"))
 			throw new InvalidOptionException(
@@ -370,16 +367,15 @@ public class CommandLineOptionsImpl implements CommandLineOptions {
 		options.addOption(inputFileOption);
 		options.addOption(inputValueOption);
 		options.addOption(inputDelimiterOption);
-		options.addOption(inputdocOption);
 		options.addOption(outputOption);
-		options.addOption(bundleOption);
+		options.addOption(bundleOption);		
 		options.addOption(inMemOption);
-		options.addOption(embedded);
-		options.addOption(clientserver);
-		options.addOption(dbProperties);
-		options.addOption(port);
-		options.addOption(startDB);
-		options.addOption(provenance);
+//		options.addOption(embedded);
+//		options.addOption(clientserver);
+//		options.addOption(dbProperties);
+//		options.addOption(port);
+//		options.addOption(startDB);
+//		options.addOption(provenance);
 		options.addOption(logFileOption);
 		options.addOption(credentialManagerDirectory);
 		options.addOption(credentialManagerPassword);

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/c62b5407/taverna-commandline-launcher/src/test/java/org/apache/taverna/commandline/TestCommandLineOptionsHandler.java
----------------------------------------------------------------------
diff --git a/taverna-commandline-launcher/src/test/java/org/apache/taverna/commandline/TestCommandLineOptionsHandler.java b/taverna-commandline-launcher/src/test/java/org/apache/taverna/commandline/TestCommandLineOptionsHandler.java
index 9fb1bf3..9cf876e 100644
--- a/taverna-commandline-launcher/src/test/java/org/apache/taverna/commandline/TestCommandLineOptionsHandler.java
+++ b/taverna-commandline-launcher/src/test/java/org/apache/taverna/commandline/TestCommandLineOptionsHandler.java
@@ -26,7 +26,7 @@ import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 import org.apache.taverna.commandline.exceptions.InvalidOptionException;
 import org.apache.taverna.commandline.options.CommandLineOptions;
-
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class TestCommandLineOptionsHandler {
@@ -59,12 +59,14 @@ public class TestCommandLineOptionsHandler {
 		assertEquals("myworkflow.t2flow", options.getWorkflow());
 	}
 
+	@Ignore
 	@Test(expected = InvalidOptionException.class)
 	public void cannotProvideInputFileAndInputDoc() throws Exception {
 		new CommandLineOptionsImpl(new String[] { "-inputfile", "fred", "fred.txt",
 				"-inputdoc", "myworkflow.t2flow" });
 	}
 
+	@Ignore
 	@Test(expected = InvalidOptionException.class)
 	public void cannotProvideInputValueAndInputDoc() throws Exception {
 		new CommandLineOptionsImpl(new String[] { "-inputvalue", "fred", "fred.txt",
@@ -132,6 +134,7 @@ public class TestCommandLineOptionsHandler {
 		assertFalse(options.hasInputFiles());
 	}
 
+	@Ignore
 	@Test
 	public void noWorkflowNameButStartDB() throws Exception {
 		// should not throw an error
@@ -141,6 +144,7 @@ public class TestCommandLineOptionsHandler {
 		assertTrue(options.getStartDatabaseOnly());
 	}
 
+	@Ignore
 	@Test
 	public void workflowNameAndStartDB() throws Exception {
 		// should not throw an error
@@ -150,18 +154,21 @@ public class TestCommandLineOptionsHandler {
 		assertFalse(options.getStartDatabaseOnly());
 	}
 
+	@Ignore
 	@Test(expected = InvalidOptionException.class)
 	public void provenanceButNoDatabase() throws Exception {
 		new CommandLineOptionsImpl(new String[] { "-provenance",
 				"myworkflow.t2flow" });
 	}
 
+	@Ignore
 	@Test(expected = InvalidOptionException.class)
 	public void provenanceButNoDatabase2() throws Exception {
 		new CommandLineOptionsImpl(new String[] { "-provenance", "-inmemory",
 				"myworkflow.t2flow" });
 	}
 
+	@Ignore
 	@Test
 	public void provenanceDatabase() throws Exception {
 		// should be no errors
@@ -182,6 +189,7 @@ public class TestCommandLineOptionsHandler {
 		assertFalse(options.hasDelimiterFor("in3"));
 	}
 
+	@Ignore
 	@Test(expected = InvalidOptionException.class)
 	public void testInputDelimiterInvalidWithInputDoc() throws Exception {
 		new CommandLineOptionsImpl(new String[] {
@@ -205,6 +213,7 @@ public class TestCommandLineOptionsHandler {
 		assertTrue(handler.hasOption("inmemory"));
 	}
 
+	@Ignore
 	@Test
 	public void testEmbedded() throws Exception {
 		CommandLineOptions handler = new CommandLineOptionsImpl(new String[] {
@@ -212,6 +221,7 @@ public class TestCommandLineOptionsHandler {
 		assertTrue(handler.hasOption("embedded"));
 	}
 
+	@Ignore
 	@Test
 	public void testClientServer() throws Exception {
 		CommandLineOptions handler = new CommandLineOptionsImpl(new String[] {
@@ -219,18 +229,21 @@ public class TestCommandLineOptionsHandler {
 		assertTrue(handler.hasOption("clientserver"));
 	}
 
+	@Ignore
 	@Test(expected = InvalidOptionException.class)
 	public void testInvalidEmbeddedAndClientServer() throws Exception {
 		new CommandLineOptionsImpl(new String[] { "-clientserver", "-embedded",
 				"myworkflow.t2flow" });
 	}
 
+	@Ignore
 	@Test(expected = InvalidOptionException.class)
 	public void testInvalidEmbeddedAndMemory() throws Exception {
 		new CommandLineOptionsImpl(new String[] { "-embedded", "-inmemory",
 				"myworkflow.t2flow" });
 	}
 
+	@Ignore
 	@Test(expected = InvalidOptionException.class)
 	public void testInvalidClientServerAndInMemory() throws Exception {
 		new CommandLineOptionsImpl(new String[] { "-clientserver", "-inmemory",
@@ -247,6 +260,7 @@ public class TestCommandLineOptionsHandler {
 		assertFalse(options.isEmbedded());
 	}
 
+	@Ignore
 	@Test
 	public void isClientServer() throws Exception {
 		CommandLineOptions options = new CommandLineOptionsImpl(new String[] {
@@ -273,6 +287,7 @@ public class TestCommandLineOptionsHandler {
 				"-logfile","/tmp/logging"});
 	}
 
+	@Ignore
 	@Test
 	public void isEmbedded() throws Exception {
 		CommandLineOptions options = new CommandLineOptionsImpl(new String[] {