You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by re...@apache.org on 2015/06/01 19:08:28 UTC
[1/4] clerezza git commit: CLEREZZA-993: added scr plugin
Repository: clerezza
Updated Branches:
refs/heads/master 99bd96153 -> 94d922a6e
CLEREZZA-993: added scr plugin
Project: http://git-wip-us.apache.org/repos/asf/clerezza/repo
Commit: http://git-wip-us.apache.org/repos/asf/clerezza/commit/f7b84f2c
Tree: http://git-wip-us.apache.org/repos/asf/clerezza/tree/f7b84f2c
Diff: http://git-wip-us.apache.org/repos/asf/clerezza/diff/f7b84f2c
Branch: refs/heads/master
Commit: f7b84f2c737102cd12cfc02955189653a774796f
Parents: 99bd961
Author: Reto Gmuer <re...@apache.org>
Authored: Mon Jun 1 14:16:18 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Mon Jun 1 14:16:18 2015 +0000
----------------------------------------------------------------------
rdf/rdfjson/pom.xml | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/clerezza/blob/f7b84f2c/rdf/rdfjson/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/rdfjson/pom.xml b/rdf/rdfjson/pom.xml
index a3d4e53..af4dc7f 100644
--- a/rdf/rdfjson/pom.xml
+++ b/rdf/rdfjson/pom.xml
@@ -64,6 +64,10 @@
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
+ <artifactId>maven-scr-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
[4/4] clerezza git commit: CLEREZZA-995: removed integrationtest.web
project
Posted by re...@apache.org.
CLEREZZA-995: removed integrationtest.web project
Project: http://git-wip-us.apache.org/repos/asf/clerezza/repo
Commit: http://git-wip-us.apache.org/repos/asf/clerezza/commit/94d922a6
Tree: http://git-wip-us.apache.org/repos/asf/clerezza/tree/94d922a6
Diff: http://git-wip-us.apache.org/repos/asf/clerezza/diff/94d922a6
Branch: refs/heads/master
Commit: 94d922a6e33fa2374edcae3964e9bff5aec7ea43
Parents: faf1374
Author: Reto Gmuer <re...@apache.org>
Authored: Mon Jun 1 17:08:10 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Mon Jun 1 17:08:10 2015 +0000
----------------------------------------------------------------------
integrationtest.web.performance/LICENSE | 201 ----------------
integrationtest.web.performance/pom.xml | 53 -----
.../integrationtest/web/performance/Get404.java | 121 ----------
.../web/performance/GetBinaryContent.java | 179 --------------
.../integrationtest/web/performance/GetRdf.java | 236 ------------------
.../web/performance/GetSparqlQuery.java | 146 ------------
.../web/performance/PutAndGetBinaryContent.java | 200 ----------------
integrationtest.web/LICENSE | 201 ----------------
integrationtest.web/pom-run.xml | 123 ----------
integrationtest.web/pom.xml | 49 ----
.../AbnormalTeminationNotificator.java | 46 ----
.../web/framework/ExceptionDescription.java | 80 -------
.../MailAbnormalTerminationNotificator.java | 208 ----------------
.../web/framework/ResultsLogger.java | 237 -------------------
.../web/framework/TestStatistics.java | 71 ------
.../web/framework/TestThread.java | 96 --------
.../framework/WebIntegrationTestFramework.java | 159 -------------
.../web/framework/WebTestCase.java | 51 ----
.../src/main/shell/testing-screenrc | 122 ----------
.../src/main/shell/tx-getlatestframework | 225 ------------------
.../src/main/shell/tx-go-to-screen.sh | 55 -----
.../src/main/shell/tx-update-launchpad.sh | 94 --------
pom.xml | 10 -
23 files changed, 2963 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web.performance/LICENSE
----------------------------------------------------------------------
diff --git a/integrationtest.web.performance/LICENSE b/integrationtest.web.performance/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/integrationtest.web.performance/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web.performance/pom.xml
----------------------------------------------------------------------
diff --git a/integrationtest.web.performance/pom.xml b/integrationtest.web.performance/pom.xml
deleted file mode 100644
index 946b91f..0000000
--- a/integrationtest.web.performance/pom.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>clerezza</artifactId>
- <groupId>org.apache.clerezza</groupId>
- <version>0.2-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>integrationtest.web.performance</artifactId>
- <packaging>bundle</packaging>
- <version>0.6-SNAPSHOT</version>
- <name>Clerezza - Web Performance Integration Tests</name>
- <dependencies>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>integrationtest.web</artifactId>
- <version>0.5-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>commons-httpclient</groupId>
- <artifactId>commons-httpclient</artifactId>
- <version>3.1</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/Get404.java
----------------------------------------------------------------------
diff --git a/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/Get404.java b/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/Get404.java
deleted file mode 100644
index b1605b6..0000000
--- a/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/Get404.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.performance;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.UsernamePasswordCredentials;
-import org.apache.commons.httpclient.auth.AuthScope;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.clerezza.integrationtest.web.framework.WebTestCase;
-
-/**
- * @scr.component
- * @scr.service
- * interface="org.apache.clerezza.integrationtest.web.framework.WebTestCase"
- *
- * @author daniel
- *
- * @since version 0.1
- */
-public class Get404 implements WebTestCase {
-
- /**
- * Service property
- *
- * @scr.property type="Integer" value="5" description=
- * "Specifies the number of threads to execute the run method."
- */
- public static final String THREAD_COUNT = "threadCount";
- private String testSubjectUriPrefix;
-
- /**
- * Service property
- *
- * @scr.property value="admin" description=
- * "Specifies the user name used in the authorization header."
- */
- public static final String USER_NAME = "user";
- private String username;
-
- /**
- * Service property
- *
- * @scr.property value="admin" description=
- * "Specifies the user password used in the authorization header."
- */
- public static final String USER_PASSWORD = "password";
- private String password;
-
- final Logger logger = LoggerFactory.getLogger(Get404.class);
-
- protected void activate(ComponentContext componentContext) {
- username = (String) componentContext.getProperties().get(USER_NAME);
- password = (String) componentContext.getProperties().get(USER_PASSWORD);
- }
-
- @Override
- public void init(String testSubjectUriPrefix) {
- logger.info("Init Get404");
- this.testSubjectUriPrefix = testSubjectUriPrefix;
- }
-
- @Override
- public void run() {
-
- try {
- URL serverURL = new URL(testSubjectUriPrefix + "/foobar");
- HttpClient client = new HttpClient();
-
- client.getState().setCredentials(AuthScope.ANY,
- new UsernamePasswordCredentials(username, password));
- HttpMethod method = new GetMethod(serverURL.toString());
- method.setRequestHeader("Accept", "*/*");
- method.setDoAuthentication(true);
-
- try {
- int responseCode = client.executeMethod(method);
-
- if (responseCode != HttpStatus.SC_NOT_FOUND) {
- throw new RuntimeException("Get404: unexpected "
- + "response code: " + responseCode);
- }
- } finally {
- method.releaseConnection();
- }
- } catch (MalformedURLException e) {
- throw new RuntimeException(e);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
-
- @Override
- public boolean multiThreadingCapable() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetBinaryContent.java
----------------------------------------------------------------------
diff --git a/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetBinaryContent.java b/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetBinaryContent.java
deleted file mode 100644
index e4a338c..0000000
--- a/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetBinaryContent.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.performance;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.apache.commons.codec.binary.Base64;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.clerezza.integrationtest.web.framework.WebTestCase;
-
-/**
- * @scr.component
- * @scr.service
- * interface="org.apache.clerezza.integrationtest.web.framework.WebTestCase"
- *
- * @author daniel, hasan
- *
- * @since version 0.1
- */
-public class GetBinaryContent implements WebTestCase {
-
- /**
- * Service property
- *
- * @scr.property type="Integer" value="10" description=
- * "Specifies the number of threads to execute the run method."
- */
- public static final String THREAD_COUNT = "threadCount";
-
- /**
- * Service property
- *
- * @scr.property value="admin" description=
- * "Specifies the user name used in the authorization header."
- */
- public static final String USER_NAME = "user";
- private String username;
-
- /**
- * Service property
- *
- * @scr.property value="admin" description=
- * "Specifies the user password used in the authorization header."
- */
- public static final String USER_PASSWORD = "password";
- private String password;
-
- private static final int CONTENT_LENGTH = 1024;
- private static final byte[] content = new byte[CONTENT_LENGTH];
- private static final String CONTENT_TYPE = "application/x-clerezza-test";
- private String requestUri;
-
- final Logger logger = LoggerFactory.getLogger(GetBinaryContent.class);
-
- protected void activate(ComponentContext componentContext) {
- username = (String) componentContext.getProperties().get(USER_NAME);
- password = (String) componentContext.getProperties().get(USER_PASSWORD);
- }
-
- @Override
- public void init(String testSubjectUriPrefix) {
-
- logger.info("Init GetBinaryContent");
-
- for (int i = 0; i < CONTENT_LENGTH; ++i) {
- content[i] = 1;
- }
-
- requestUri = testSubjectUriPrefix + "/foo";
-
- put(requestUri, content);
- }
-
- private void put(String requestUri, byte[] content) {
- try {
- URL url = new URL(requestUri);
- HttpURLConnection con = (HttpURLConnection) url.openConnection();
- con.setRequestMethod("PUT");
- con.setRequestProperty("Accept", "*/*");
- con.setRequestProperty("Content-Type", CONTENT_TYPE);
- con.setRequestProperty("Authorization", "Basic "
- + new String(Base64
- .encodeBase64((username + ":" + password)
- .getBytes())));
- con.setDoOutput(true);
-
- OutputStream os = con.getOutputStream();
- os.write(content);
- os.flush();
-
- int responseCode = con.getResponseCode();
- if (responseCode != 201 && responseCode != 202) {
- throw new RuntimeException("PutBinaryContent: unexpected "
- + "response code: " + responseCode);
- }
- } catch (MalformedURLException me) {
- throw new RuntimeException(me);
- } catch (IOException ioe) {
- throw new RuntimeException(ioe);
- }
- }
-
- @Override
- public void run() {
- try {
- URL url = new URL(requestUri);
- HttpURLConnection con = (HttpURLConnection) url.openConnection();
- try {
- con.setRequestMethod("GET");
- con.setRequestProperty("Accept", "*/*");
- con.setRequestProperty("Content-Type", CONTENT_TYPE);
- con.setRequestProperty("Authorization", "Basic "
- + new String(Base64
- .encodeBase64((username + ":" + password)
- .getBytes())));
- con.setDoInput(true);
-
- int responseCode = con.getResponseCode();
- if (responseCode != 200) {
- throw new RuntimeException("GetBinaryContent: unexpected "
- + "response code: " + responseCode);
- }
-
- InputStream inputStream = con.getInputStream();
- try {
- int byteData;
- int ctr = 0;
- while ((byteData = inputStream.read()) != -1) {
- if (byteData != 1) {
- throw new RuntimeException(
- "GetBinaryContent: Read data does not match input data.");
- }
- ++ctr;
- }
- if (ctr != CONTENT_LENGTH) {
- throw new RuntimeException(
- "GetBinaryContent: Content length does not match.");
- }
- } finally {
- inputStream.close();
- }
- } finally {
- con.disconnect();
- }
- } catch (MalformedURLException me) {
- me.printStackTrace();
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
- }
-
- @Override
- public boolean multiThreadingCapable() {
- return true;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetRdf.java
----------------------------------------------------------------------
diff --git a/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetRdf.java b/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetRdf.java
deleted file mode 100644
index e0eec6e..0000000
--- a/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetRdf.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.performance;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.apache.commons.codec.binary.Base64;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.clerezza.integrationtest.web.framework.WebTestCase;
-
-/**
- * @scr.component
- * @scr.service
- * interface="org.apache.clerezza.integrationtest.web.framework.WebTestCase"
- *
- * @author hasan, daniel
- *
- * @since version 0.1
- */
-public class GetRdf implements WebTestCase {
-
- /**
- * Service property
- *
- * @scr.property type="Integer" value="3" description=
- * "Specifies the number of threads to execute the run method."
- */
- public static final String THREAD_COUNT = "threadCount";
-
- /**
- * The URI of the resource after POSTed to the subject under test
- */
- private String resourceUri;
-
- /**
- * The RDF resource as a String
- */
- private String rdfResource;
-
- /**
- * Service property
- *
- * @scr.property value="admin" description=
- * "Specifies the user name used in the authorization header."
- */
- public static final String USER_NAME = "user";
- private String username;
-
- /**
- * Service property
- *
- * @scr.property value="admin" description=
- * "Specifies the user password used in the authorization header."
- */
- public static final String USER_PASSWORD = "password";
- private String password;
-
- private String authString;
-
- final Logger logger = LoggerFactory.getLogger(GetRdf.class);
-
-
- protected void activate(ComponentContext componentContext) throws UnsupportedEncodingException {
- username = (String) componentContext.getProperties().get(USER_NAME);
- password = (String) componentContext.getProperties().get(USER_PASSWORD);
- authString = new String(Base64.encodeBase64((username + ":" + password).
- getBytes()), "UTF-8");
- }
-
- @Override
- public void init(String testSubjectUriPrefix) {
-
- logger.info("Init GetRdf");
-
- resourceUri = testSubjectUriPrefix + "/getrdftestcase";
-
- String postRequestUri = testSubjectUriPrefix
- + "/tools/editor/post?resource=" + resourceUri;
-
- post(postRequestUri);
- }
-
- private void post(String postRequestUri) {
-
- HttpURLConnection con = null;
-
- try {
- rdfResource =
-"<rdf:RDF\n" +
-" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n" +
-" xmlns:j.0=\"http://discobits.org/ontology#\" > \n" +
-" <rdf:Description rdf:about=\"" + resourceUri + "\">\n" +
-" <rdf:type rdf:resource=\"http://discobits.org/ontology#XHTMLInfoDiscoBit\"/>\n" +
-" <j.0:infoBit rdf:parseType=\"Literal\">some <em xmlns=\"http://www.w3.org/1999/xhtml\">xhtml</em> content</j.0:infoBit>\n" +
-" </rdf:Description>\n" +
-"</rdf:RDF>\n";
-
- URL url = new URL(postRequestUri);
- con = (HttpURLConnection) url.openConnection();
- con.setRequestMethod("POST");
- con.setRequestProperty("Accept", "*/*");
- con.setRequestProperty("Content-Type", "application/rdf+xml");
- con.setRequestProperty("Authorization", "Basic " + authString);
- con.setInstanceFollowRedirects(false);
- con.setDoOutput(true);
-
- OutputStream outputStream = con.getOutputStream();
- outputStream.write(rdfResource.getBytes("UTF-8"));
- outputStream.close();
-
- int responseCode = con.getResponseCode();
- if (responseCode >= 400) {
- throw new RuntimeException("GetRdf: (POST) unexpected "
- + "response code: " + responseCode);
- }
- } catch (MalformedURLException me) {
- throw new RuntimeException(me);
- } catch (IOException ioe) {
- throw new RuntimeException(ioe);
- } finally {
- con.disconnect();
- }
- }
-
- @Override
- public void run() {
-
- try {
- URL url = new URL(resourceUri);
- HttpURLConnection con = (HttpURLConnection) url.openConnection();
- try {
- con.setRequestMethod("GET");
- con.setRequestProperty("Accept", "application/rdf+xml");
- con.setRequestProperty("Authorization", "Basic " + authString);
- con.setDoInput(true);
-
- int responseCode = con.getResponseCode();
- if (responseCode != 200) {
- throw new RuntimeException("GetRdf: (GET) unexpected "
- + "response code: " + responseCode);
- }
-
- String contentType = con.getContentType();
- if (contentType == null) {
- throw new RuntimeException(
- "GetRdf: Couldn't determine content type.");
- }
-
- int length = con.getContentLength();
- byte[] content = new byte[length];
- InputStream inputStream = con.getInputStream();
- try {
-
- int i = 0;
- while (i < length
- && ((content[i++] = (byte) inputStream.read()) != -1)) {
- }
- if (i != length) {
- throw new RuntimeException(
- "GetRdf: Couldn't read all data.");
- }
- String contentStr = new String(content,
- getCharSet(contentType));
-
- if (!contentStr.contains(getInfoBitString(rdfResource))) {
- throw new RuntimeException(
- "GetRdf: Content does not contain expected information.");
- }
- } finally {
- inputStream.close();
- }
- } finally {
- con.disconnect();
- }
- } catch (MalformedURLException me) {
- me.printStackTrace();
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
- }
-
- private String getCharSet(String contentType) {
- int idx = contentType.toLowerCase().indexOf("charset=");
- if (idx == -1) {
- return "UTF-8";
- }
- String[] charSet = contentType.substring(idx).split("=");
- if (charSet.length != 2) {
- throw new RuntimeException("GetRdf: Invalid Content-Type");
- }
- return charSet[1];
- }
-
- @Override
- public boolean multiThreadingCapable() {
- return true;
- }
-
- private String getInfoBitString(String rdfResourceString) {
- String dataStr = rdfResourceString;
- int fromIdx = dataStr.indexOf("<infoBit");
- if (fromIdx == -1) {
- return dataStr;
- }
- int infoBitStart = 1 + dataStr.indexOf('>', fromIdx);
- int infoBitEnd = dataStr.indexOf("</infoBit>");
- if (infoBitEnd == -1) {
- return dataStr;
- }
- return dataStr.substring(infoBitStart, infoBitEnd);
- }
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetSparqlQuery.java
----------------------------------------------------------------------
diff --git a/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetSparqlQuery.java b/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetSparqlQuery.java
deleted file mode 100644
index 094ec61..0000000
--- a/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/GetSparqlQuery.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.performance;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import java.net.URLEncoder;
-import org.apache.commons.codec.binary.Base64;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.clerezza.integrationtest.web.framework.WebTestCase;
-
-/**
- *
- * A <code>WebTestCase</code> for testing the SPAQRL endpoint. The test creates
- * a SPARQL CONSTRUCT query and send a GET-request. The request accepts
- * "application/rdf+xml"
- *
- * @scr.component
- * @scr.service
- * interface="org.apache.clerezza.integrationtest.web.framework.WebTestCase"
- *
- * @author tio
- *
- */
-public class GetSparqlQuery implements WebTestCase {
-
- /**
- * Service property
- *
- * @scr.property type="Integer" value="10" description=
- * "Specifies the number of threads to execute the run method."
- */
- public static final String THREAD_COUNT = "threadCount";
- /**
- * Service property
- *
- * @scr.property value="admin" description=
- * "Specifies the user name used in the authorization header."
- */
- public static final String USER_NAME = "user";
- private String username;
- /**
- * Service property
- *
- * @scr.property value="admin" description=
- * "Specifies the user password used in the authorization header."
- */
- public static final String USER_PASSWORD = "password";
- private String password;
- private static final String UTF8 = "UTF-8";
- private String requestUri;
- private String query;
- final Logger logger = LoggerFactory.getLogger(GetSparqlQuery.class);
-
- protected void activate(ComponentContext componentContext) {
- username = (String) componentContext.getProperties().get(USER_NAME);
- password = (String) componentContext.getProperties().get(USER_PASSWORD);
- }
-
- @Override
- public void init(String testSubjectUriPrefix) {
-
- logger.info("Init sparql query get request");
-
- query = "CONSTRUCT { <http://example.org> " +
- "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?x . }" +
- "WHERE { ?y <http://clerezza.org/2009/04/typerendering#mediaType> ?x . }";
- requestUri = testSubjectUriPrefix + "/sparql";
-
- }
-
- @Override
- public void run() {
- try {
- String queryParams = URLEncoder.encode("query", UTF8) + "=" + URLEncoder.encode(query, UTF8);
- queryParams += "&";
- queryParams += URLEncoder.encode("default-graph-uri", UTF8) + "=" +
- URLEncoder.encode("urn:x-localinstance:/content.graph", UTF8);
- URL url = new URL(requestUri + "?" + queryParams);
- HttpURLConnection con = (HttpURLConnection) url.openConnection();
- try {
- con.setRequestMethod("GET");
- con.setRequestProperty("Accept", "application/rdf+xml");
- con.setRequestProperty("Authorization", "Basic " + new String(Base64.encodeBase64((username + ":" + password).getBytes())));
- con.setDoOutput(true);
-
- int responseCode = con.getResponseCode();
- if (responseCode != 200) {
- throw new RuntimeException("GetSparqlQuery: unexpected " + "response code: " + responseCode);
- }
- String contentType = con.getContentType();
- if (contentType == null) {
- throw new RuntimeException(
- "GetSparqlQuery: Couldn't determine content type.");
- }
- int length = con.getContentLength();
- byte[] content = new byte[length];
- InputStream inputStream = con.getInputStream();
- try {
- int i = 0;
- while (i < length && ((content[i++] = (byte) inputStream.read()) != -1)) {
- }
- if (i != length) {
- throw new RuntimeException(
- "GetSparqlQuery: Couldn't read all data.");
- }
- } finally {
- inputStream.close();
- }
- } finally {
- con.disconnect();
- }
- } catch (MalformedURLException me) {
- me.printStackTrace();
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
- }
-
- @Override
- public boolean multiThreadingCapable() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/PutAndGetBinaryContent.java
----------------------------------------------------------------------
diff --git a/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/PutAndGetBinaryContent.java b/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/PutAndGetBinaryContent.java
deleted file mode 100644
index 757fc22..0000000
--- a/integrationtest.web.performance/src/main/java/org/apache/clerezza/integrationtest/web/performance/PutAndGetBinaryContent.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.performance;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.apache.commons.codec.binary.Base64;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.clerezza.integrationtest.web.framework.WebTestCase;
-
-/**
- * This test uses the HTTP PUT method in each iteration to generate a resource on the tested
- * instance and uses the HTTP GET method to retrieve and check that resource.
- *
- * @scr.component
- * @scr.service
- * interface="org.apache.clerezza.integrationtest.web.framework.WebTestCase"
- *
- * @author daniel
- *
- * @since version 0.1
- */
-public class PutAndGetBinaryContent implements WebTestCase {
-
-
- /**
- * Service property
- *
- * @scr.property type="Integer" value="10" description=
- * "Specifies the number of threads to execute the run method.
- * NOTE: This test creates two HTTP connections per iteration)"
- */
- public static final String THREAD_COUNT = "threadCount";
-
- /**
- * Service property
- *
- * @scr.property value="admin" description=
- * "Specifies the user name used in the authorization header."
- */
- public static final String USER_NAME = "user";
- private String username;
-
- /**
- * Service property
- *
- * @scr.property value="admin" description=
- * "Specifies the user password used in the authorization header."
- */
- public static final String USER_PASSWORD = "password";
- private String password;
-
- private static final int CONTENT_LENGTH = 1024;
- private static final byte[] content = new byte[CONTENT_LENGTH];
- private static final String CONTENT_TYPE = "application/x-clerezza-test";
-
- private String requestUri;
- private static final String RESOURCE_PATH = "/putandgetbinarycontenttest-";
-
- final Logger logger = LoggerFactory.getLogger(PutAndGetBinaryContent.class);
-
- protected void activate(ComponentContext componentContext) {
- username = (String) componentContext.getProperties().get(USER_NAME);
- password = (String) componentContext.getProperties().get(USER_PASSWORD);
- }
-
- @Override
- public void init(String testSubjectUriPrefix) {
- logger.info("Init " + getClass().getName());
-
- for (int i = 0; i < CONTENT_LENGTH; ++i) {
- content[i] = 1;
- }
-
- requestUri = testSubjectUriPrefix;
-
- }
-
- private void put() {
- try {
- URL url = new URL(requestUri + RESOURCE_PATH
- + Thread.currentThread().getName());
- HttpURLConnection con = (HttpURLConnection) url.openConnection();
- try {
- con.setRequestMethod("PUT");
- con.setRequestProperty("Accept", "*/*");
- con.setRequestProperty("Content-Type", CONTENT_TYPE);
- con.setRequestProperty("Authorization", "Basic "
- + new String(Base64
- .encodeBase64((username + ":" + password)
- .getBytes())));
- con.setDoOutput(true);
- OutputStream os = con.getOutputStream();
- try {
- os.write(content);
- } finally {
- os.close();
- }
-
- int responseCode = con.getResponseCode();
- if (responseCode != 201 && responseCode != 202) {
- throw new RuntimeException(getClass().getSimpleName()
- + ": unexpected " + "response code: "
- + responseCode);
- }
- } finally {
- con.disconnect();
- }
- } catch (MalformedURLException me) {
- throw new RuntimeException(me);
- } catch (IOException ioe) {
- throw new RuntimeException(ioe);
- }
- }
-
- private void get() {
- try {
- URL url = new URL(requestUri + RESOURCE_PATH
- + Thread.currentThread().getName());
- HttpURLConnection con = (HttpURLConnection) url.openConnection();
- try {
- con.setRequestMethod("GET");
- con.setRequestProperty("Accept", "*/*");
- con.setRequestProperty("Content-Type", CONTENT_TYPE);
- con.setRequestProperty("Authorization", "Basic "
- + new String(Base64
- .encodeBase64((username + ":" + password)
- .getBytes())));
- con.setDoInput(true);
-
- int responseCode = con.getResponseCode();
- if (responseCode != 200) {
- throw new RuntimeException(getClass().getSimpleName()
- + ": unexpected " + "response code: "
- + responseCode);
- }
-
- InputStream inputStream = con.getInputStream();
- try {
- int byteData;
- int ctr = 0;
- while ((byteData = inputStream.read()) != -1) {
- if (byteData != 1) {
- throw new RuntimeException(getClass()
- .getSimpleName()
- + ": Read data does not match input data.");
- }
- ++ctr;
- }
- if (ctr != CONTENT_LENGTH) {
- throw new RuntimeException(getClass().getSimpleName()
- + ": Content length does not match.");
- }
- } finally {
- inputStream.close();
- }
- } finally {
- con.disconnect();
- }
- } catch (MalformedURLException me) {
- me.printStackTrace();
- } catch (IOException ioe) {
- ioe.printStackTrace();
- }
- }
-
- @Override
- public void run() {
- put();
- get();
- }
-
- @Override
- public boolean multiThreadingCapable() {
- return true;
- }
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/LICENSE
----------------------------------------------------------------------
diff --git a/integrationtest.web/LICENSE b/integrationtest.web/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/integrationtest.web/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/pom-run.xml
----------------------------------------------------------------------
diff --git a/integrationtest.web/pom-run.xml b/integrationtest.web/pom-run.xml
deleted file mode 100644
index 0060568..0000000
--- a/integrationtest.web/pom-run.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>org.apache.clerezza.parent</artifactId>
- <groupId>org.apache.clerezza</groupId>
- <version>0.2-SNAPSHOT</version>
- </parent>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>org.apache.clerezza.integrationtest.web-run</artifactId>
- <packaging>pom</packaging>
- <version>0.1-SNAPSHOT</version>
- <name>Clerezza - Web Test Framework</name>
- <description>A framework to run tests against a webserver</description>
- <properties>
- <org.osgi.service.http.port>8383</org.osgi.service.http.port>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.ops4j.pax.logging</groupId>
- <artifactId>pax-logging-api</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.logging</groupId>
- <artifactId>pax-logging-service</artifactId>
- <version>1.4</version>
- </dependency>
- <dependency>
- <artifactId>org.apache.clerezza.integrationtest.web</artifactId>
- <groupId>org.apache.clerezza</groupId>
- </dependency>
- <dependency>
- <groupId>org.apache.clerezza.ext</groupId>
- <artifactId>javax.mail</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>org.apache.clerezza.integrationtest.web.performance</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>com.springsource.org.apache.commons.httpclient</artifactId>
- <version>3.1.0</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <!-- web cosole and deps -->
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.webconsole</artifactId>
- <scope>provided</scope>
- <version>1.2.10</version>
- </dependency>
- <dependency>
- <groupId>org.ops4j.pax.web</groupId>
- <artifactId>pax-web-bundle</artifactId>
- <scope>provided</scope>
- <version>0.6.0</version>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty</artifactId>
- <scope>provided</scope>
- <version>6.1.16</version>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jetty-util</artifactId>
- <scope>provided</scope>
- <version>6.1.16</version>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>servlet-api-2.5</artifactId>
- <scope>provided</scope>
- <version>6.1.14</version>
- </dependency>
- <!-- make services configurable -->
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.configadmin</artifactId>
- <scope>provided</scope>
- <version>1.2.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.metatype</artifactId>
- <scope>provided</scope>
- <version>1.0.4</version>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.scr</artifactId>
- <scope>provided</scope>
- <version>1.0.8</version>
- </dependency>
- </dependencies>
-</project>
-
-
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/pom.xml
----------------------------------------------------------------------
diff --git a/integrationtest.web/pom.xml b/integrationtest.web/pom.xml
deleted file mode 100644
index ee2c5a7..0000000
--- a/integrationtest.web/pom.xml
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <artifactId>clerezza</artifactId>
- <groupId>org.apache.clerezza</groupId>
- <version>0.2-SNAPSHOT</version>
- <relativePath>../parent</relativePath>
- </parent>
- <groupId>org.apache.clerezza</groupId>
- <artifactId>integrationtest.web</artifactId>
- <packaging>bundle</packaging>
- <version>0.5-SNAPSHOT</version>
- <name>Clerezza - Web Test Framework</name>
- <description>A framework to run tests against a webserver</description>
- <dependencies>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.clerezza.ext</groupId>
- <artifactId>javax.mail</artifactId>
- <version>0.5-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/AbnormalTeminationNotificator.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/AbnormalTeminationNotificator.java b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/AbnormalTeminationNotificator.java
deleted file mode 100644
index 3135dbf..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/AbnormalTeminationNotificator.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-import java.util.List;
-
-/**
- * Provides a method to send notifications (for example via E-Mail) in case the
- * {@link WebIntegrationTestFramework} terminates because of
- * <code>RuntimeExceptions</code> in running tests.
- *
- * @author daniel
- *
- */
-public interface AbnormalTeminationNotificator {
-
- /**
- * Send a notification about an abnormal termination.
- *
- * @param exeptionDescriptionList
- * Holds all the <code>RuntimeExceptions</code>,
- * the threads in which they occurred
- * and the time after which they occurred.
- * The first element is the exception that occurred first
- * and caused the shutdown of the test framework.
- */
- public void notifyAbnormalTermination(
- List<ExceptionDescription> exeptionDescriptionList);
-
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ExceptionDescription.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ExceptionDescription.java b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ExceptionDescription.java
deleted file mode 100644
index 8e7af65..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ExceptionDescription.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-/**
- * Holds Exception occurred in {@link TestThread} instances along with
- * additional information.
- *
- * @author daniel
- *
- */
-public final class ExceptionDescription {
-
- private final long timeInNanos;
- private final TestThread testThread;
- private final RuntimeException exception;
-
- /**
- * Constructor.
- *
- * @param timeInNanos
- * The time the test iteration was running until the
- * <code>RuntimeException</code> occurred.
- * @param testThread
- * The TestThread that the exception occurred in.
- * @param exception
- * The exception that occurred.
- */
- public ExceptionDescription(long timeInNanos, TestThread testThread,
- RuntimeException exception) {
-
- this.timeInNanos = timeInNanos;
- this.testThread = testThread;
- this.exception = exception;
- }
-
- /**
- * Returns the time the test iteration was running until the exception
- * occurred.
- *
- * @return the time in nano-seconds.
- */
- public long getTimeInNanos() {
- return timeInNanos;
- }
-
- /**
- * Returns the thread in which the exception occurred.
- *
- * @return the thread instance.
- */
- public TestThread getTestThread() {
- return testThread;
- }
-
- /**
- * Returns the <code>RuntimeException</code> that occurred.
- *
- * @return the exception instance.
- */
- public RuntimeException getException() {
- return exception;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/MailAbnormalTerminationNotificator.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/MailAbnormalTerminationNotificator.java b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/MailAbnormalTerminationNotificator.java
deleted file mode 100644
index eb65ce3..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/MailAbnormalTerminationNotificator.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Date;
-import java.util.List;
-import java.util.Properties;
-
-import javax.mail.Address;
-import javax.mail.Authenticator;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.PasswordAuthentication;
-import javax.mail.Session;
-import javax.mail.Transport;
-import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeMessage;
-
-import org.osgi.service.component.ComponentContext;
-
-/**
- * Sends an E-Mail notification when the Integrationtest-Framework terminates
- * abnormally.
- *
- * @author daniel
- *
- * @scr.component
- * @scr.service interface=
- * "org.apache.clerezza.integrationtest.web.framework.AbnormalTeminationNotificator"
- */
-public class MailAbnormalTerminationNotificator implements
- AbnormalTeminationNotificator {
-
- /**
- * Service property
- *
- * @scr.property value="false"
- * description="Specifies if TLS (SSL) encryption is used."
- */
- public static final String MAIL_USE_TLS = "useTLS";
-
- /**
- * Service property
- *
- * @scr.property value="smtp.myHost.org"
- * description="Specifies the SMTP host."
- */
- public static final String MAIL_SMTP_HOST = "smtpHost";
-
- /**
- * Service property
- *
- * @scr.property value="25" description="Specifies the SMTP port."
- */
- public static final String MAIL_SMTP_PORT = "smtpPort";
-
- /**
- * Service property
- *
- * @scr.property value="myPassword" description=
- * "Specifies the authentication password (plain text) for SMTP."
- */
- public static final String MAIL_SMTP_PASSWORD = "smtpPassword";
-
- /**
- * Service property
- *
- * @scr.property value="myUserName"
- * description="Specifies the User to authenticate for SMTP."
- */
- public static final String MAIL_SMTP_USER = "smtpUser";
-
- /**
- * Service property
- *
- * @scr.property value="integrationtest@myHost.org"
- * description="Specifies the E-Mail address of the sender."
- */
- public static final String MAIL_SENDER = "emailSender";
-
- /**
- * Service property
- *
- * @scr.property value="myName@myHost.org"
- * description="Specifies the E-Mail address of the recipient."
- */
- public static final String MAIL_RECIPIENT = "emailRecipient";
-
- /**
- * Service property
- *
- * @scr.property value="[Integrationtest-Framework]"
- * description="Specifies the begining of the E-Mail subject."
- */
- public static final String MAIL_SUBJECT_INTRO = "subjectIntro";
-
- private Properties properties;
-
- protected void activate(ComponentContext componentContext) {
- properties = new Properties();
-
- properties.setProperty("mail.debug", "false");
-
- if (((String) componentContext.getProperties().get(MAIL_USE_TLS))
- .equals("true")) {
-
- properties.setProperty("mail.smtp.starttls.enable", "true");
- properties.setProperty("mail.smtp.auth", "true");
- properties.setProperty("mail.smtp.socketFactory.fallback", "false");
- }
-
- properties.setProperty("mail.transport.protocol", "smtp");
- properties.setProperty("mail.smtp.port", (String) componentContext
- .getProperties().get(MAIL_SMTP_PORT));
- properties.setProperty("emailRecipient", (String) componentContext
- .getProperties().get(MAIL_RECIPIENT));
- properties.setProperty("mail.from", (String) componentContext
- .getProperties().get(MAIL_SENDER));
- properties.setProperty("mail.smtp.host", (String) componentContext
- .getProperties().get(MAIL_SMTP_HOST));
- properties.setProperty("smtpUser", (String) componentContext
- .getProperties().get(MAIL_SMTP_USER));
- properties.setProperty("smtpPassword", (String) componentContext
- .getProperties().get(MAIL_SMTP_PASSWORD));
- properties.setProperty("subjectIntro", (String) componentContext
- .getProperties().get(MAIL_SUBJECT_INTRO));
-
- }
-
- @Override
- public void notifyAbnormalTermination(
- List<ExceptionDescription> exeptionDescriptionList) {
-
- StringWriter messageBody = new StringWriter();
- PrintWriter printWriter = new PrintWriter(messageBody);
-
- Date date = new Date();
-
- printWriter.println(date);
-
- for (ExceptionDescription exceptionDescription : exeptionDescriptionList) {
- printWriter.print("The test-thread ");
- printWriter.print(exceptionDescription.getTestThread().getName());
- printWriter.print(" got a ");
- printWriter.print(exceptionDescription.getException().getClass()
- .getName());
- printWriter.print(" after ");
- printWriter.print(exceptionDescription.getTimeInNanos());
- printWriter.println(" ns");
- exceptionDescription.getException().printStackTrace(printWriter);
- }
-
- printWriter.close();
-
- try {
- Address to = new InternetAddress(properties
- .getProperty("emailRecipient"));
-
- Authenticator auth = new Authenticator() {
- @Override
- public PasswordAuthentication getPasswordAuthentication() {
- return new PasswordAuthentication(properties
- .getProperty("smtpUser"), properties
- .getProperty("smtpPassword"));
- }
- };
-
- Session session = Session.getInstance(properties, auth);
-
- MimeMessage message = new MimeMessage(session);
- message.setSentDate(date);
- message
- .setSubject(properties.getProperty("subjectIntro")
- + " "
- + exeptionDescriptionList.get(0).getException()
- .getClass().getName()
- + " in "
- + exeptionDescriptionList.get(0).getTestThread()
- .getName() + ".");
- message.setText(messageBody.toString());
- message.setFrom();
- message.addRecipient(Message.RecipientType.TO, to);
-
- Transport.send(message);
-
- } catch (MessagingException ex) {
- throw new RuntimeException(ex);
- }
- }
-}
\ No newline at end of file
[2/4] clerezza git commit: CLEREZZA-992: added scr plugin
Posted by re...@apache.org.
CLEREZZA-992: added scr plugin
Project: http://git-wip-us.apache.org/repos/asf/clerezza/repo
Commit: http://git-wip-us.apache.org/repos/asf/clerezza/commit/faf13745
Tree: http://git-wip-us.apache.org/repos/asf/clerezza/tree/faf13745
Diff: http://git-wip-us.apache.org/repos/asf/clerezza/diff/faf13745
Branch: refs/heads/master
Commit: faf13745585f24bb649f0690e5628d4ff29c5057
Parents: f7b84f2
Author: Reto Gmuer <re...@apache.org>
Authored: Mon Jun 1 15:48:09 2015 +0000
Committer: Reto Gmuer <re...@apache.org>
Committed: Mon Jun 1 15:48:09 2015 +0000
----------------------------------------------------------------------
rdf/jena/sparql/pom.xml | 8 ++++++++
1 file changed, 8 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/clerezza/blob/faf13745/rdf/jena/sparql/pom.xml
----------------------------------------------------------------------
diff --git a/rdf/jena/sparql/pom.xml b/rdf/jena/sparql/pom.xml
index 10c8671..7d2bf2e 100644
--- a/rdf/jena/sparql/pom.xml
+++ b/rdf/jena/sparql/pom.xml
@@ -44,6 +44,14 @@
</dependency>
</dependencies>
</dependencyManagement>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-scr-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
<dependencies>
<dependency>
<groupId>org.apache.clerezza</groupId>
[3/4] clerezza git commit: CLEREZZA-995: removed integrationtest.web
project
Posted by re...@apache.org.
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ResultsLogger.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ResultsLogger.java b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ResultsLogger.java
deleted file mode 100644
index ecfc6b6..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/ResultsLogger.java
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- *
- * @author hasan, reto
- *
- * @since version 0.1
- */
-public class ResultsLogger {
-
- AbnormalTeminationNotificator notificator;
-
- private List<ExceptionDescription> exeptionDescriptionList = new ArrayList<ExceptionDescription>();
-
- private PrintWriter printWriter;
- /**
- * the prefix of report files' name
- */
- private static final String REPORT_FILEPRFX = "testresults-";
- /**
- * the suffix of report files' name
- */
- private static final String REPORT_FILESUFX = ".txt";
- /**
- * maps a TestThread to its statistics data
- */
- private Map<TestThread, TestStatistics> testThreadStatistics =
- new HashMap<TestThread, TestStatistics>();
-
- final Logger logger = LoggerFactory.getLogger(ResultsLogger.class);
-
- ResultsLogger(String resultsDirectory, AbnormalTeminationNotificator notificator) {
- this.notificator = notificator;
- printWriter = null;
-
- try {
- String index = getNextIndex(resultsDirectory);
- String fname = resultsDirectory + "/" + REPORT_FILEPRFX + index + ".txt";
- logger.info("ResultsLogger: test results stored into {}", fname);
- File f = new File(fname);
- if (!f.exists()) {
- f.createNewFile();
- }
- printWriter = new PrintWriter(new FileWriter(f, true));
- } catch (IOException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- /**
- * gets the next index to be used as part of the filename for storing
- * test results
- *
- * @param resultsDirectory the directory for storing test results
- * @return index for the new file to store test results
- */
- private String getNextIndex(String resultsDirectory) {
- File dir = new File(resultsDirectory);
-
- FilenameFilter filter = new FilenameFilter() {
-
- @Override
- public boolean accept(File dir, String name) {
- return name.startsWith(REPORT_FILEPRFX) &&
- name.endsWith(REPORT_FILESUFX);
- }
- };
-
- String[] children = dir.list(filter);
-
- if (children == null) { // Either dir does not exist or is not a directory or is not readable
- if (dir.isFile()) {
- throw new RuntimeException(resultsDirectory +
- " already exists as a file");
- }
- if (dir.exists()) {
- if (!dir.canRead()) {
- throw new RuntimeException("Cannot read directory " +
- resultsDirectory);
- }
- } else {
- if (!dir.mkdir()) {
- throw new RuntimeException("Cannot create directory " +
- resultsDirectory);
- }
- }
- return "1";
- } else {
- int max = 0;
- for (int i = 0; i < children.length; i++) {
- // Get filename of file
- String filename = children[i];
- String strIndex = filename.substring(REPORT_FILEPRFX.length(),
- filename.length() - REPORT_FILESUFX.length());
- int idx = Integer.parseInt(strIndex);
- if (max < idx) {
- max = idx;
- }
- }
- return String.valueOf(++max);
- }
- }
-
- /**
- * logs results of a TestThread
- * updates TestStatistics of this TestThread
- *
- * @param timeInNanos elapsed time measured by the TestThread
- * @param test the TestThread
- */
- synchronized void logResult(long timeInNanos, TestThread test) {
- TestStatistics testStatistics = getTestStatistics(test);
- testStatistics.newTestValue(timeInNanos);
-
- printWriter.print(test.getName());
- printWriter.print("\t");
- printWriter.print(timeInNanos);
- printWriter.println("\tns");
- printWriter.flush();
- }
-
- synchronized void logException(long timeInNanos, TestThread testThread, RuntimeException exception) {
- exeptionDescriptionList.add(new ExceptionDescription(timeInNanos, testThread, exception));
- }
-
- /**
- * returns an instance of a TestStatistics for the given TestThread
- * creates a new instance if none has been assigned to this TestThread
- *
- * @param test TestThread whose information is to be logged
- * @return the TestStatistics assigned to this TestThread
- */
- private TestStatistics getTestStatistics(TestThread test) {
- TestStatistics testStatistics = testThreadStatistics.get(test);
- if (testStatistics == null) {
- testStatistics = new TestStatistics();
- testThreadStatistics.put(test, testStatistics);
- }
- return testStatistics;
- }
-
- /**
- * this method prints all TestStatistics and then close the writer
- */
- void close() {
- Set<TestThread> testThreads = testThreadStatistics.keySet();
- TestStatistics testStatistics;
- printWriter.println("# Test Statistics:");
- for (TestThread tt : testThreads) {
- testStatistics = testThreadStatistics.get(tt);
- printWriter.print(tt.getName());
- printWriter.print("\t");
- printWriter.print(testStatistics.getMax());
- printWriter.print("\tns\t");
- printWriter.print(testStatistics.getMin());
- printWriter.print("\tns\t");
- printWriter.print(testStatistics.getSum() / testStatistics.getSize());
- printWriter.println("\tns");
- }
- if (exeptionDescriptionList.size() == 0) {
- printWriter.print("# Test regularly terminated at: ");
- } else {
- printWriter.print("# Test terminated after exception at: ");
- notifyAbnormalTemination();
- }
- printWriter.println(new Date());
- printExceptions();
- printWriter.close();
- }
-
- private void notifyAbnormalTemination() {
- if (notificator != null) {
- printWriter.println("Sending notification...");
- try {
- notificator.notifyAbnormalTermination(exeptionDescriptionList);
- } catch (RuntimeException ex) {
- printWriter.println();
- printWriter.println("###ERROR### Couldn't send notification:");
- ex.printStackTrace(printWriter);
- printWriter.println("###");
- }
- }
-
- }
-
- private void printExceptions() {
- for (ExceptionDescription exceptionDescription : exeptionDescriptionList) {
- printExceptionDescription(exceptionDescription);
- }
-
- }
-
- private void printExceptionDescription(
- ExceptionDescription exceptionDescription) {
- printWriter.print("The test-thread ");
- printWriter.print(exceptionDescription.getTestThread().getName());
- printWriter.print(" got a ");
- printWriter.print(exceptionDescription.getException().getClass().getName());
- printWriter.print(" after ");
- printWriter.print(exceptionDescription.getTimeInNanos());
- printWriter.println(" ns");
- exceptionDescription.getException().printStackTrace(printWriter);
-
- }
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestStatistics.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestStatistics.java b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestStatistics.java
deleted file mode 100644
index ee460ac..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestStatistics.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-/**
- * An object of this class stores the minimum, maximum, sum, and size of
- * a set of test values.
- * Each time a new test value is reported it determines the new minimum,
- * maximum, sum, and size.
- * The test values themselves are however not stored.
- *
- * @author hasan
- *
- * @since version 0.1
- */
-
-class TestStatistics {
-
- private long min;
- private long max;
- private long sum = 0;
- private long size = 0;
-
- long getMax() {
- return max;
- }
-
- long getMin() {
- return min;
- }
-
- long getSize() {
- return size;
- }
-
- long getSum() {
- return sum;
- }
-
- void newTestValue(long value) {
- if (size == 0) {
- min = value;
- max = value;
- } else {
- if (max < value) {
- max = value;
- }
- if (min > value) {
- min = value;
- }
- }
- sum += value;
- size++;
- }
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestThread.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestThread.java b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestThread.java
deleted file mode 100644
index 2c79f91..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/TestThread.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-/**
- *
- * @author hasan, reto
- *
- * @since version 0.1
- */
-class TestThread extends Thread {
-
- /**
- * the WebTestCase whose run method is to be executed by this thread
- */
- private WebTestCase wtc;
- /**
- * the time required (in nanoseconds) to execute the run method of
- * a WebTestCase
- */
- private long elapsedTime;
- private ResultsLogger resultsLogger;
- private boolean stopRequested = false;
- private long loopSleepTime; // ms
- private WebIntegrationTestFramework webIntegrationTestFramework;
-
- TestThread(String threadName, WebTestCase wtc, WebIntegrationTestFramework webIntegrationTestFramework, ResultsLogger resultsLogger,
- long loopSleepTime) {
- super(threadName);
- this.wtc = wtc;
- this.webIntegrationTestFramework = webIntegrationTestFramework;
- this.resultsLogger = resultsLogger;
- this.loopSleepTime = loopSleepTime;
- }
-
- /**
- * this method repeatedly executes the run method of the registered
- * WebTestCase and measures the elapsed time.
- * repetition is done until stop is requested.
- *
- * @see WebTestCase#run()
- * @see #requestStop()
- */
- @Override
- public void run() {
- try {
- while (!stopRequested) {
- long startTime = System.nanoTime();
- try {
- wtc.run();
- webIntegrationTestFramework.incrementIterationCounter();
- } catch (RuntimeException ex) {
- elapsedTime = System.nanoTime() - startTime;
- resultsLogger.logException(elapsedTime, this, ex);
- webIntegrationTestFramework.requestThreadsStop();
- break;
- }
- elapsedTime = System.nanoTime() - startTime;
- resultsLogger.logResult(elapsedTime, this);
-
- try {
- sleep(loopSleepTime);
- } catch (InterruptedException ex) {
- ex.printStackTrace();
- }
- }
- } finally {
- webIntegrationTestFramework.notifyThreadFinishing(this);
- }
- }
-
- /**
- * this method is used to stop this thread
- *
- * @see #run()
- */
- void requestStop() {
- stopRequested = true;
- }
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebIntegrationTestFramework.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebIntegrationTestFramework.java b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebIntegrationTestFramework.java
deleted file mode 100644
index d952b3e..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebIntegrationTestFramework.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-import java.util.HashSet;
-import java.util.Set;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.component.ComponentContext;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * An instance of this class is responsible for running all {@link WebTestCase}S
- * which implement the service as referred below.
- *
- * @scr.component
- * @scr.reference name="WebTestCase"
- * cardinality="1..n" policy="static"
- * interface="org.apache.clerezza.integrationtest.web.framework.WebTestCase"
- *
- * @author hasan, reto
- *
- * @since version 0.1
- */
-public class WebIntegrationTestFramework {
-
- private Set<ServiceReference> boundTestCases = new HashSet<ServiceReference>();
- private Set<TestThread> allTestThreads = new HashSet<TestThread>();
- private Set<TestThread> runningTestThreads = new HashSet<TestThread>();
- private ResultsLogger resultsLogger;
- /**
- * Service property
- *
- * @scr.property value="http://localhost:8080"
- * description="Specifies the URI prefix of the subject under test."
- */
- public static final String SUBJECT_UNDER_TEST = "subjectUnderTest";
- /**
- * Service property
- *
- * @scr.property value="testresults"
- * description="Specifies the directory to place result log files."
- */
- public static final String TEST_RESULTS_DIR = "testResultsDirectory";
- /**
- * Service property
- *
- * @scr.property type="Long" value="0"
- * description="Specifies the break time in ms before executing the next iteration."
- */
- public static final String ITER_BREAK_TIME = "iterationBreakTime";
-
- /**
- * Service property
- *
- * @scr.property type="Long" value="100"
- * description="Specifies after how many iterations the Garbage Collection is run."
- */
- public static final String GC_FREQUENCY = "gcFrequency";
- private long gcFrequency = 100;
- private long iterationCounter = 0;
-
- /**
- * @scr.reference cardinality=0..1
- */
- AbnormalTeminationNotificator notificator;
- final Logger logger = LoggerFactory.getLogger(WebIntegrationTestFramework.class);
-
- synchronized protected void incrementIterationCounter() {
- if(++iterationCounter == gcFrequency) {
- iterationCounter = 0;
- System.gc();
- }
- }
-
- protected void bindWebTestCase(ServiceReference serviceReference) {
- logger.info("Binding {}", serviceReference.toString());
- boundTestCases.add(serviceReference);
- }
-
- protected void unbindWebTestCase(ServiceReference serviceReference) {
- logger.info("Unbinding {}", serviceReference.toString());
- boundTestCases.remove(serviceReference);
- }
-
- protected void activate(ComponentContext componentContext) {
- logger.info("Activating WebIntegrationTestFramework");
- final String resultsDirectory = (String) componentContext.getProperties().get(TEST_RESULTS_DIR);
- resultsLogger = new ResultsLogger(resultsDirectory, notificator);
- final String subjectUnderTest = (String) componentContext.getProperties().get(SUBJECT_UNDER_TEST);
-
- final long iterationBreakTime = (Long) componentContext.getProperties().get(ITER_BREAK_TIME);
-
- gcFrequency = (Long) componentContext.getProperties().get(GC_FREQUENCY);
-
- for (ServiceReference serviceRef : boundTestCases) {
- WebTestCase wtc = (WebTestCase) componentContext.locateService("WebTestCase", serviceRef);
- wtc.init(subjectUnderTest);
-
- String testCaseName = wtc.getClass().getSimpleName();
- int threadCount = 1;
- if (wtc.multiThreadingCapable()) {
- threadCount = (Integer) serviceRef.getProperty("threadCount");
- }
- logger.info("WebIntegrationTestFramework: {} threads to execute {}", threadCount, testCaseName);
- for (int i = 0; i < threadCount; i++) {
- TestThread testCaseThread =
- new TestThread(testCaseName + "-" + i, wtc, this, resultsLogger,
- iterationBreakTime);
- allTestThreads.add(testCaseThread);
- }
- }
- for (TestThread th : allTestThreads) {
- th.start();
- runningTestThreads.add(th);
- }
- }
-
- protected void deactivate(ComponentContext componentContext) {
- logger.info("Deactivating WebIntegrationTestFramework");
- requestThreadsStop();
- for (TestThread th : allTestThreads) {
- try {
- th.join();
- } catch (InterruptedException ex) {
- ex.printStackTrace();
- }
- }
- }
-
- void notifyThreadFinishing(TestThread thread) {
- runningTestThreads.remove(thread);
- if (runningTestThreads.size() == 0) {
- resultsLogger.close();
- }
- }
-
- void requestThreadsStop() {
- for (TestThread th : allTestThreads) {
- th.requestStop();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebTestCase.java
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebTestCase.java b/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebTestCase.java
deleted file mode 100644
index ac7a610..0000000
--- a/integrationtest.web/src/main/java/org/apache/clerezza/integrationtest/web/framework/WebTestCase.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.clerezza.integrationtest.web.framework;
-
-/**
- *
- * @author hasan
- *
- * @since version 0.1
- */
-public interface WebTestCase {
-
- /**
- * This method is called to allow a WebTestCase to do some initialization
- * tasks prior to the run method being called
- *
- * @param testSubjectUriPrefix the URI prefix of the subject under test.
- */
- public void init(String testSubjectUriPrefix);
-
- /**
- * This method performs the actual test and can throw a RuntimeException.
- *
- */
- public void run();
-
- /**
- * This method determines whether it is allowed to have several threads
- * running in parallel executing the run method of this WebTestCase.
- *
- * If an implementation returns true, it MUST provide a configurable
- * <code>@scr.property</code> named "threadCount" and of type Integer.
- */
- public boolean multiThreadingCapable();
-}
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/shell/testing-screenrc
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/shell/testing-screenrc b/integrationtest.web/src/main/shell/testing-screenrc
deleted file mode 100644
index c3671fd..0000000
--- a/integrationtest.web/src/main/shell/testing-screenrc
+++ /dev/null
@@ -1,122 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# /etc/screenrc
-#
-# This is the system wide screenrc.
-#
-# You can use this file to change the default behavior of screen system wide
-# or copy it to ~/.screenrc and use it as a starting point for your own
-# settings.
-#
-# Commands in this file are used to set options, bind screen functions to
-# keys, redefine terminal capabilities, and to automatically establish one or
-# more windows at the beginning of your screen session.
-#
-# This is not a comprehensive list of options, look at the screen manual for
-# details on everything that you can put in this file.
-#
-
-# ------------------------------------------------------------------------------
-# SCREEN SETTINGS
-# ------------------------------------------------------------------------------
-
-startup_message off
-#nethack on
-
-#defflow on # will force screen to process ^S/^Q
-deflogin on
-#autodetach off
-
-# turn visual bell on
-vbell off
-vbell_msg " Wuff ---- Wuff!! "
-
-# define a bigger scrollback, default is 100 lines
-defscrollback 1024
-
-# ------------------------------------------------------------------------------
-# SCREEN KEYBINDINGS
-# ------------------------------------------------------------------------------
-
-# Remove some stupid / dangerous key bindings
-bind ^k
-#bind L
-bind ^\
-# Make them better
-bind \\ quit
-bind K kill
-bind I login on
-bind O login off
-bind } history
-
-# An example of a "screen scraper" which will launch urlview on the current
-# screen window
-#
-#bind ^B eval "hardcopy_append off" "hardcopy -h $HOME/.screen-urlview" "screen urlview $HOME/.screen-urlview"
-
-# ------------------------------------------------------------------------------
-# TERMINAL SETTINGS
-# ------------------------------------------------------------------------------
-
-# The vt100 description does not mention "dl". *sigh*
-termcapinfo vt100 dl=5\E[M
-
-# turn sending of screen messages to hardstatus off
-hardstatus off
-# Set the hardstatus prop on gui terms to set the titlebar/icon title
-termcapinfo xterm*|rxvt*|kterm*|Eterm* hs:ts=\E]0;:fs=\007:ds=\E]0;\007
-# use this for the hard status string
-#hardstatus string "%h%? users: %u%?"
-
-hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
-
-# An alternative hardstatus to display a bar at the bottom listing the
-# windownames and highlighting the current windowname in blue. (This is only
-# enabled if there is no hardstatus setting for your terminal)
-#
-#hardstatus lastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
-
-hardstatus alwayslastline
-
-# set these terminals up to be 'optimal' instead of vt100
-termcapinfo xterm*|linux*|rxvt*|Eterm* OP
-
-# Change the xterm initialization string from is2=\E[!p\E[?3;4l\E[4l\E>
-# (This fixes the "Aborted because of window size change" konsole symptoms found
-# in bug #134198)
-termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
-
-# To get screen to add lines to xterm's scrollback buffer, uncomment the
-# following termcapinfo line which tells xterm to use the normal screen buffer
-# (which has scrollback), not the alternate screen buffer.
-#
-#termcapinfo xterm|xterms|xs|rxvt ti@:te@
-
-# ------------------------------------------------------------------------------
-# STARTUP SCREENS
-# ------------------------------------------------------------------------------
-
-# Example of automatically running some programs in windows on screen startup.
-#
-# The following will open top in the first window, an ssh session to monkey
-# in the next window, and then open mutt and tail in windows 8 and 9
-# respectively.
-#
-# screen top
-# screen -t monkey ssh monkey
-# screen -t mail 8 mutt
-# screen -t daemon 9 tail -f /var/log/daemon.log
-
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/shell/tx-getlatestframework
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/shell/tx-getlatestframework b/integrationtest.web/src/main/shell/tx-getlatestframework
deleted file mode 100755
index 098f1d8..0000000
--- a/integrationtest.web/src/main/shell/tx-getlatestframework
+++ /dev/null
@@ -1,225 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#-------------------------------------------------------------------------------
-# This script downloads the latest sversion of org.apache.clerezza.integrationtest.web
-# and org.apache.clerezza.integrationtest.web.performance
-#-------------------------------------------------------------------------------
-# Author: daniel.spicar@clerezza.org
-#-------------------------------------------------------------------------------
-# Requirements: curl, wget, bash
-#-------------------------------------------------------------------------------
-
-# error codes
-NO_ERROR=0
-DOWNLOAD_FAILED=1
-BAD_ARGUMENTS=2
-REQUIREMENTS_NOT_FULFILLED=3
-NOT_DOWNLOADED=4
-
-command_test=$(whatis "curl" | grep 'nothing appropriate')
-if [ -n "$command_test" ]; then
- echo "curl not found.";
- exit $REQUIREMENTS_NOT_FULFILLED
-fi
-command_test=$(whatis "wget" | grep 'nothing appropriate')
-if [ -n "$command_test" ]; then
- echo "wget not found.";
- exit $REQUIREMENTS_NOT_FULFILLED
-fi
-
-# global vars
-BIN_URI_FRAMEWORK=http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.integrationtest.web/
-BIN_URI_FRAMEWORK_RELEASE=`echo $BIN_URI_FRAMEWORK | sed 's/snapshot/release/'`
-BIN_URI_PERFORMANCETEST=http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.integrationtest.web.performance/
-BIN_URI_PERFORMANCETEST_RELEASE=`echo $BIN_URI_PERFORMANCETEST | sed 's/snapshot/release/'`
-LIB_DIR=`pwd`
-
-# Prints the usage message
-print_usage()
-{
- echo "Usage: tx-getlatestframework [<output-directory> <framework-repo-uri> <performancetest-repo-uri>]"
-}
-
-# Checks whether the supplied file is present in LIB_DIR
-# Args: file
-check_file()
-{
- local file
-
- if [ $# -eq 1 ]; then
- file=$1
- else
- return $BAD_ARGUMENTS;
- fi
-
- if [ -e $LIB_DIR/$file ]; then
- return 0
- else
- return 1
- fi
-}
-
-# Downloads the specified binary. Requires exactly 3 arguments.
-# Args: uri
-# directory
-# file
-download_bin()
-{
- local uri
- local dir
- local file
-
- if [ $# -eq 3 ]; then
- uri=$1
- dir=$2
- file=$3
- else
- return $BAD_ARGUMENTS;
- fi
-
- if `check_file $file`; then
- echo "the most recent file is $LIB_DIR/$file and it is already downloaded."
- return $NOT_DOWNLOADED
- else
- if wget -O $LIB_DIR/$file $uri$dir$file ; then
- return $NO_ERROR
- fi
- fi
-
- return $DOWNLOAD_FAILED
-}
-
-# Checks if the first the first supplied version is higher than the second.
-# Syntax: Versions are interpreted as follows: major_version.minor_version
-# Example: to compare if 0.10 is larger than 0.9, the arguments are: 0 10 0 9
-#
-# NOTE: Same versions return true as well.
-# This means the first argument is prioritized.
-#
-# Args: major_version_first
-# minor_version_first
-# major_version_second
-# minor_version_second
-is_higher_version()
-{
- if [ $# -ne 4 ]; then
- return $BAD_ARGUMENTS
- fi
-
- if [ $1 -gt $3 ]; then
- return 0
- else
- if [ $1 -eq $3 ]; then
- if [ $2 -ge $4 ]; then
- return 0
- fi
- fi
- fi
-
- return 1
-}
-
-# Get the latest binary.
-# Args: uri
-# uri_release
-# Returns: An array with latest_uri latest_dir latest_file in that order.
-get_latest_version()
-{
- if [ $# -ne 2 ]; then
- return $BAD_ARGUMENTS
- fi
-
- local uri
- local uri_release
- local major_version_release
- local minor_version_release
- local major_version_snapshot
- local minor_version_snapshot
- local major_version
- local minor_version
-
- uri=$1
- uri_release=$2
- major_version_release=-1
- minor_version_release=-1
- for line in `curl $uri_release 2> /dev/null | sed 's/^.*\">//;s/<\/a.*$//;1,/Parent Directory/d;/^[^0-9]/,$d;'`; do
- major_version=`echo $line | sed 's/\.[0-9]\+\///'`
- minor_version=`echo $line | sed 's/\///;s/^[0-9]\+\.//'`
- if `is_higher_version $major_version $minor_version $major_version_release $minor_version_release`; then
- major_version_release=$major_version
- minor_version_release=$minor_version
- latest_dir_release=$line
- fi
- done
-
- major_version_snapshot=-1
- minor_version_snapshot=-1
- for line in `curl $uri 2> /dev/null | sed 's/^.*\">//;s/<\/a.*$//;1,/Parent Directory/d;/^[^0-9]/,$d;'`; do
- major_version=`echo $line | sed 's/\.[0-9]\+-SNAPSHOT\///'`
- minor_version=`echo $line | sed 's/-SNAPSHOT\///;s/^[0-9]\+\.//'`
- if `is_higher_version $major_version $minor_version $major_version_snapshot $minor_version_snapshot`; then
- major_version_snapshot=$major_version
- minor_version_snapshot=$minor_version
- latest_dir=$line
- fi
- done
-
- if `is_higher_version $major_version_release $minor_version_release $major_version_snapshot $minor_version_snapshot`; then
- latest_dir=$latest_dir_release
- uri=$uri_release
- fi
-
- for line in `curl $uri$latest_dir 2> /dev/null | sed '1,/<a href=\"o/d;/<hr>/,$d;/\.jar</!d;/sources/d;s/^ *<a href=\"//;s/\">.*$//'`; do
- latest_file=$line
- done
-
- local ret
- ret=( $uri $latest_dir $latest_file )
- echo ${ret[@]}
-}
-
-# main script
-# Argument handling
-if [ $# -lt 4 ]; then
- if [ $# -ge 1 ]; then
- case $1 in
- -*) print_usage; exit $NO_ERROR;;
- *) LIB_DIR=$1;;
- esac
- fi
- if [ $# -ge 2 ]; then
- BIN_URI_FRAMEWORK=$2
- BIN_URI_FRAMEWORK_RELEASE=`echo $BIN_URI_FRAMEWORK | sed 's/snapshot/release/'`
- fi
- if [ $# -eq 3 ]; then
- BIN_URI_PERFORMANCETEST=$3
- BIN_URI_PERFORMANCETEST_RELEASE=`echo $BIN_URI_PERFORMANCETEST | sed 's/snapshot/release/'`
- fi
-else
- echo "Too many arguments!"
- print_usage
- exit $BAD_ARGUMETNS
-fi
-
-
-latest_version=( `get_latest_version $BIN_URI_FRAMEWORK $BIN_URI_FRAMEWORK_RELEASE` )
-echo ${latest_version[@]}
-download_bin ${latest_version[@]}
-latest_version=( `get_latest_version $BIN_URI_PERFORMANCETEST $BIN_URI_PERFORMANCETEST_RELEASE` )
-download_bin ${latest_version[@]}
-exit $?
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/shell/tx-go-to-screen.sh
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/shell/tx-go-to-screen.sh b/integrationtest.web/src/main/shell/tx-go-to-screen.sh
deleted file mode 100755
index d4b7638..0000000
--- a/integrationtest.web/src/main/shell/tx-go-to-screen.sh
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-print_usage()
-{
- echo "usage: tx-go-to-screen [<path/to/screenrc>]"
- exit 0
-}
-
-SCREENRC = `pwd`/testing-screenrc
-
-if [ $# -lt 2 ]
-then
- if [ $# -eq 1 ]
- then
- case $1 in
- -*) print_usage; exit 1;;
- *) SCREENRC=$1;;
- esac
- fi
-else
- echo "Too many arguments!"
- print_usage
- exit 1
-fi
-
-for screen_instance in `screen -ls | sed '1d;/Socket/d;$d;s/^.*\.//;s/(.*$//'`
-do
- if [ $screen_instance = "testing" ]
- then
- screen -raD testing
- exit 0
- fi
-done
-
-`screen -c $SCREENRC -S testing`
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/integrationtest.web/src/main/shell/tx-update-launchpad.sh
----------------------------------------------------------------------
diff --git a/integrationtest.web/src/main/shell/tx-update-launchpad.sh b/integrationtest.web/src/main/shell/tx-update-launchpad.sh
deleted file mode 100755
index 3a78ab5..0000000
--- a/integrationtest.web/src/main/shell/tx-update-launchpad.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/sh
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-
-print_usage()
-{
- echo "usage: tx-update-launchpad [<output-directory> <project-uri>]"
- exit 0
-}
-
-
-
-LAUNCHPAD_DIR=`pwd`
-LAUNCHPAD_URI=http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.cms.launchpad/
-
-if [ $# -lt 3 ]
-then
- if [ $# -ge 1 ]
- then
- case $1 in
- -*) print_usage; exit 1;;
- *) LAUNCHPAD_DIR=$1;;
- esac
- fi
- if [ $# -eq 2 ]
- then
- LAUNCHPAD_URI = $2
- fi
-else
- echo "Too many arguments!"
- print_usage
- exit 1
-fi
-
-
-echo "looking for latest launchpad version..."
-
-for line in `curl $LAUNCHPAD_URI 2> /dev/null | sed 's/^.*\">//;s/<\/a.*$//;1,/Parent Directory/d;/^[^0-9]/,$d;'`
-do
- latest_dir=$line
-done
-
-for line in `curl $LAUNCHPAD_URI$line 2> /dev/null | sed '1,/<a href=\"o/d;/<hr>/,$d;/.jar</!d;/sources/d;s/^ *<a href=\"//;s/\">.*$//'`
-do
- latest_file=$line
-done
-
-echo "found: $latest_dir$latest_file"
-
-if [ -e $LAUNCHPAD_DIR/$latest_file ]
-then
- echo "the current launchpad is already the latest version."
-else
- echo "downloading the latest launchpad..."
-
- oldfile=`ls -l launchpad | sed 's/^.*-> //'`
-
- if wget -O $LAUNCHPAD_DIR/$latest_file $LAUNCHPAD_URI$latest_dir$latest_file
- then
- if [ -e launchpad ]
- then
- if [ "$oldfile" != "$latest_file" ]
- then
- rm -f $LAUNCHPAD_DIR/$oldfile
- unlink launchpad
- fi
- fi
-
- ln -s $LAUNCHPAD_DIR/$latest_file launchpad
- else
- exit 1
- fi
-fi
-
-exit 0
http://git-wip-us.apache.org/repos/asf/clerezza/blob/94d922a6/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index fc39996..be51525 100644
--- a/pom.xml
+++ b/pom.xml
@@ -164,16 +164,6 @@
</build>
</profile>
<profile>
- <id>it</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <modules>
- <module>integrationtest.web</module>
- <module>integrationtest.web.performance</module>
- </modules>
- </profile>
- <profile>
<id>additions</id>
<activation>
<activeByDefault>false</activeByDefault>