diff options
Diffstat (limited to 'test/unit/applications/lang/java.py')
-rw-r--r-- | test/unit/applications/lang/java.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/unit/applications/lang/java.py b/test/unit/applications/lang/java.py index a034d9a4..0aa1a7af 100644 --- a/test/unit/applications/lang/java.py +++ b/test/unit/applications/lang/java.py @@ -9,7 +9,7 @@ from unit.applications.proto import TestApplicationProto class TestApplicationJava(TestApplicationProto): - def load(self, script, name='app', **kwargs): + def prepare_env(self, script): app_path = option.temp_dir + '/java' web_inf_path = app_path + '/WEB-INF/' classes_path = web_inf_path + 'classes/' @@ -75,6 +75,9 @@ class TestApplicationJava(TestApplicationProto): except: pytest.fail('Cann\'t run javac process.') + def load(self, script, **kwargs): + self.prepare_env(script) + self._load_conf( { "listeners": {"*:7080": {"pass": "applications/" + script}}, @@ -83,8 +86,11 @@ class TestApplicationJava(TestApplicationProto): "unit_jars": option.current_dir + '/build', "type": 'java', "processes": {"spare": 0}, - "working_directory": script_path, - "webapp": app_path, + "working_directory": option.test_dir + + '/java/' + + script + + '/', + "webapp": option.temp_dir + '/java', } }, }, |