[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r15615: add TestExecutor interface and beginning of an implementatio (in puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi: . impl)



Author: sebastian
Date: 2008-07-03 01:30:33 -0400 (Thu, 03 Jul 2008)
New Revision: 15615

Added:
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/TestExecutor.java
   puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/TestExecutorImpl.java
Log:
add TestExecutor interface and beginning of an implementation

Added: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/TestExecutor.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/TestExecutor.java	                        (rev 0)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/TestExecutor.java	2008-07-03 05:30:33 UTC (rev 15615)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2008, Sebastian Hahn
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ *     * Neither the names of the copyright owners nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package de.uniba.wiai.lspi.puppetor.rmi;
+
+import java.util.Set;
+import java.util.concurrent.ConcurrentMap;
+
+ /**
+  * A master uses a <code>TestExecutor</code> to load all registered tests and
+  * check whether the currently running PuppeTor network can satisfy the
+  * precondition necessary to run the test. If yes, it sets up the testing
+  * environment and passes <code>PuppeTorJob</code>s to the slaves as the test
+  * instructs it to do.
+  *
+  * @author Sebastian Hahn
+  */
+public interface TestExecutor {
+    /**
+     * Register a test with the executor so it will consider it for execution.
+     * Accept all submitted tests even though some may not be executable at the
+     * moment of submission.
+     */
+    public void registerTest( PuppeTorTest test );
+    
+    /**
+     * Start executing tests. Callers should make sure that the PuppeTor
+     * network that is supposed to be used is ready.
+     */
+    public void startTesting();
+    
+    /**
+     * Return a Map of the nodes that have been run successfully along with the
+     * results of the tests.
+     */
+    public ConcurrentMap<PuppeTorTest, PuppeTorTestResult> getSuccessfulTests();
+    
+    /**
+     * Return a Map of the nodes that have been run but didn't complete
+     * successfully along with the results of the tests.
+     */
+    public ConcurrentMap<PuppeTorTest, PuppeTorTestResult> getFailedTests();
+    
+    /**
+     * Return all tests that could not be executed because the PuppeTorNetwork
+     * could not match a test's preconditions.
+     */
+    public Set<PuppeTorTest> getNotRunTests();
+}

Added: puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/TestExecutorImpl.java
===================================================================
--- puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/TestExecutorImpl.java	                        (rev 0)
+++ puppetor/branches/gsoc2008/src/de/uniba/wiai/lspi/puppetor/rmi/impl/TestExecutorImpl.java	2008-07-03 05:30:33 UTC (rev 15615)
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2008, Sebastian Hahn
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ *     * Neither the names of the copyright owners nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package de.uniba.wiai.lspi.puppetor.rmi.impl;
+
+import java.util.Set;
+import java.util.concurrent.ConcurrentMap;
+
+import de.uniba.wiai.lspi.puppetor.rmi.PuppeTorTest;
+import de.uniba.wiai.lspi.puppetor.rmi.PuppeTorTestResult;
+import de.uniba.wiai.lspi.puppetor.rmi.TestExecutor;
+
+/**
+ * @author Sebastian Hahn
+ */
+public class TestExecutorImpl implements TestExecutor {
+
+    protected void evaluateNetwork() {
+        ;
+    }
+    
+    public void startTesting() {
+        // TODO Auto-generated method stub
+
+    }
+
+    public ConcurrentMap<PuppeTorTest, PuppeTorTestResult> getFailedTests() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Set<PuppeTorTest> getNotRunTests() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public ConcurrentMap<PuppeTorTest, PuppeTorTestResult> getSuccessfulTests() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void registerTest(PuppeTorTest test) {
+        // TODO Auto-generated method stub
+
+    }
+
+}