From 617917b2f4f662a2965a4a1e0ea88a21c57b0206 Mon Sep 17 00:00:00 2001 From: erbel <johannes.erbel@cs.uni-goettingen.de> Date: Wed, 22 May 2019 14:36:49 +0200 Subject: [PATCH] Add Iteration Test --- README.md | 1 + build.gradle | 3 +-- config/checkstyle/checkstyle.xml | 3 --- .../de/ugoe/cs/rwm/mocci/package-info.java | 3 --- .../java/de/ugoe/cs/rwm/mocci/MapeTest.java | 23 ++++++++++++++++++ .../ugoe/cs/rwm/mocci/live/package-info.java | 10 ++++++++ .../de.ugoe.cs.rwm.mocci.connector.dummy.jar | Bin 15305 -> 15305 bytes 7 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 src/test/java/de/ugoe/cs/rwm/mocci/live/package-info.java diff --git a/README.md b/README.md index 65ad87d..dbac22d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # MOCCI [](https://gitlab.gwdg.de/rwm/de.ugoe.cs.rwm.mocci/commits/master) +[](https://gitlab.gwdg.de/rwm/de.ugoe.cs.rwm.mocci/commits/master) MOCCI is an extension for the [Open Cloud Computing Interface (OCCI)](http://occi-wg.org/about/specification/) to enable a model-driven management of monitoring devices in the cloud, as well as storing their results within an OCCI-compliant runtime model. Together with other tools from the OCCI ecosystem it provides a testing and execution environment for self-adaptive systems with an EMF-based architecture runtime model ([Snapshot in JSON format](./doc/browser.png)). In the following you will find a getting started guide in which a preconfigured VirtualBox image is downloaded to perform example scenarios and an tutorial on how to enrich existing OCCI models with monitoring functionality. Moreover, an introduction to MOCCI's components is provided, as well as links and description on how to integrate MOCCI with other pre-existing tooling from the OCCI ecosystem. The paper submitted to this artifact and the VirtualBox image can be found [here](https://owncloud.gwdg.de/index.php/s/5u2ddnyyNlzecM5) with the password being mocci. diff --git a/build.gradle b/build.gradle index c93c8d3..d877423 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ -apply plugin: "com.github.psxpaul.execfork" apply plugin: 'jacoco' +apply plugin: "com.github.psxpaul.execfork" apply plugin: 'com.github.johnrengelman.shadow' ext{ @@ -121,7 +121,6 @@ dependencies { compile "org.eclipse.uml2:org.eclipse.uml2.common:1.8.2" compile group: 'org.eclipse.ocl', name: 'pivot', version: '1.3.0' - testCompile group: 'junit', name: 'junit', version: '4.12' } diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index fd085c6..dfb6e35 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -4,9 +4,6 @@ "http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd"> <module name="Checker"> <property name="charset" value="UTF-8"/> - <module name="JavadocPackage"/> - - <module name="TreeWalker"> <module name="RegexpSinglelineJava"> <property name="format" value="^\t* "/> diff --git a/src/main/java/de/ugoe/cs/rwm/mocci/package-info.java b/src/main/java/de/ugoe/cs/rwm/mocci/package-info.java index 2bfc2db..9e91f34 100644 --- a/src/main/java/de/ugoe/cs/rwm/mocci/package-info.java +++ b/src/main/java/de/ugoe/cs/rwm/mocci/package-info.java @@ -1,6 +1,3 @@ -/** - * - */ /** * Main package that includes util classes as well as the monitoring interface. * diff --git a/src/test/java/de/ugoe/cs/rwm/mocci/MapeTest.java b/src/test/java/de/ugoe/cs/rwm/mocci/MapeTest.java index e8b1024..72bba2b 100644 --- a/src/test/java/de/ugoe/cs/rwm/mocci/MapeTest.java +++ b/src/test/java/de/ugoe/cs/rwm/mocci/MapeTest.java @@ -76,4 +76,27 @@ public class MapeTest { assertTrue(TestUtility.equalsRuntime(MAPE.runtimeModel, MAPE.conn)); } + @Test + public void Iterations() { + int iterations = 20; + int count = 0; + int interval = 1000; + while (count < iterations) { + try { + System.out.println("\n--------------------Waiting for new MAPE-K Cycle: Sleeping " + interval + + "--------------------"); + Thread.sleep(interval); + + Monitor monitor = MAPE.monitor(); + String analysis = MAPE.analyze(monitor); + MAPE.runtimeModel = MAPE.plan(analysis); + MAPE.execute(MAPE.runtimeModel); + count++; + } catch (InterruptedException e) { + e.printStackTrace(); + } + + } + } + } diff --git a/src/test/java/de/ugoe/cs/rwm/mocci/live/package-info.java b/src/test/java/de/ugoe/cs/rwm/mocci/live/package-info.java new file mode 100644 index 0000000..b6a9aa2 --- /dev/null +++ b/src/test/java/de/ugoe/cs/rwm/mocci/live/package-info.java @@ -0,0 +1,10 @@ +/** + * + */ +/** + * Main package that includes MOCCI live tests. + * + * @author erbel + * + */ +package de.ugoe.cs.rwm.mocci.live; diff --git a/src/test/resources/martserver-plugins/de.ugoe.cs.rwm.mocci.connector.dummy.jar b/src/test/resources/martserver-plugins/de.ugoe.cs.rwm.mocci.connector.dummy.jar index 1ef9810d18a9541eeb5fb4aae3db163426b83f56..85e5c798dfe9fcca9d13102397bc19d58d03104a 100644 GIT binary patch delta 59 zcmX?EezJVSP9qM<l5KvMqT-?^A2iZpFLZnw1H_X*8JRK~E!HsRKu8-{TQGy9vaRC) D`_&iY delta 59 zcmX?EezJVSP9qNKGIKw><Xor82aUAYj}~~u0P*BcMy8CWi#3cn5Yh(L7R(^2Z0k4x DvhNjo -- GitLab