Browse Source

configuration files needed for the TE testing framework.

Mike Megally 12 years ago
parent
commit
ca574da75a
3 changed files with 36 additions and 0 deletions
  1. 0 0
      dropwizard/__init__.py
  2. 13 0
      dropwizard/benchmark_config
  3. 23 0
      dropwizard/setup.py

+ 0 - 0
dropwizard/__init__.py


+ 13 - 0
dropwizard/benchmark_config

@@ -0,0 +1,13 @@
+{
+    "framework": "dropwizard",
+    "tests": [{
+        "default": {
+            "setup_file": "setup",
+            "json_url": "/json",
+            "db_url": "/db",
+            "query_url": "/db?queries=",
+            "port": 8080,
+            "sort": 31
+        }
+    }]
+}

+ 23 - 0
dropwizard/setup.py

@@ -0,0 +1,23 @@
+import subprocess
+import sys
+import setup_util
+from os.path import expanduser
+
+home = expanduser("~")
+
+def start(args):
+    setup_util.replace_text("dropwizard/hello-world.yml", "url: jdbc:mysql://localhost/hello_world", "url: jdbc:mysql://" + args.database_host + ":3306/hello_world")
+
+    try:
+        subprocess.check_call("mvn package;", shell=True, cwd="dropwizard")
+        subprocess.check_call("java -jar target/hello-world-0.0.1-SNAPSHOT.jar server hello-world.yml", shell=True, cwd="dropwizard")
+        return 0
+    except subprocess.CalledProcessError:
+        return 1
+def stop():
+    try:
+        subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
+        return 0
+    except subprocess.CalledProcessError:
+        return 1
+