Skip to content

Commit

Permalink
Stronger isolation of the integration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmihajlovski committed Sep 23, 2016
1 parent eb1ffd4 commit 3196083
Show file tree
Hide file tree
Showing 50 changed files with 120 additions and 86 deletions.
Expand Up @@ -26,15 +26,15 @@
import org.rapidoid.commons.Env;
import org.rapidoid.commons.RapidoidInfo;
import org.rapidoid.config.Conf;
import org.rapidoid.http.IntegrationTestCommons;
import org.rapidoid.http.IsolatedIntegrationTest;
import org.rapidoid.scan.ClasspathUtil;
import org.rapidoid.setup.App;

import java.util.Map;

@Authors("Nikolche Mihajlovski")
@Since("5.2.3")
public class StatusHandlerTest extends IntegrationTestCommons {
public class StatusHandlerTest extends IsolatedIntegrationTest {

@Test
public void testDefault() throws Exception {
Expand Down
Expand Up @@ -33,7 +33,7 @@

@Authors("Nikolche Mihajlovski")
@Since("4.1.0")
public class AsyncHttpServerTest extends IntegrationTestCommons {
public class AsyncHttpServerTest extends IsolatedIntegrationTest {

@Test
public void testAsyncHttpServer() {
Expand Down
Expand Up @@ -27,12 +27,15 @@
import org.rapidoid.annotation.POST;
import org.rapidoid.annotation.Since;
import org.rapidoid.data.JSON;
import org.rapidoid.setup.*;
import org.rapidoid.setup.Admin;
import org.rapidoid.setup.App;
import org.rapidoid.setup.My;
import org.rapidoid.setup.On;
import org.rapidoid.u.U;

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class CustomizationTest extends IntegrationTestCommons {
public class CustomizationTest extends IsolatedIntegrationTest {

@Test
public void testSerializationConfig() {
Expand Down
Expand Up @@ -30,7 +30,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class HttpAdminAndDevServerTest extends IntegrationTestCommons {
public class HttpAdminAndDevServerTest extends IsolatedIntegrationTest {

@Test
public void testAdminOnAppServer() {
Expand Down
Expand Up @@ -27,7 +27,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class HttpAdminServerTest extends IntegrationTestCommons {
public class HttpAdminServerTest extends IsolatedIntegrationTest {

@Test
public void testAdminServer() {
Expand Down
Expand Up @@ -28,7 +28,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.0.10")
public class HttpErrorTest extends IntegrationTestCommons {
public class HttpErrorTest extends IsolatedIntegrationTest {

@Test
public void testWithHandlerException() {
Expand Down
Expand Up @@ -28,7 +28,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.0.11")
public class HttpFullRawResponseTest extends IntegrationTestCommons {
public class HttpFullRawResponseTest extends IsolatedIntegrationTest {

public static final String BYTES_RESPONSE = "HTTP/1.1 200 OK\nContent-Length: 5\n\nbytes";

Expand Down
Expand Up @@ -27,7 +27,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class HttpHandlerTypesTest extends IntegrationTestCommons {
public class HttpHandlerTypesTest extends IsolatedIntegrationTest {

@Test
public void testHandlerTypes() {
Expand Down
Expand Up @@ -37,7 +37,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.0.11")
public class HttpHtmlApiTest extends IntegrationTestCommons {
public class HttpHtmlApiTest extends IsolatedIntegrationTest {

@Test
public void test01() {
Expand Down
Expand Up @@ -29,7 +29,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.0.11")
public class HttpMultiControllerTest extends IntegrationTestCommons {
public class HttpMultiControllerTest extends IsolatedIntegrationTest {

@Test
public void testSequentialControllerRegistration() {
Expand Down
Expand Up @@ -33,7 +33,7 @@

@Authors("Nikolche Mihajlovski")
@Since("2.0.0")
public class HttpMultipartFormTest extends IntegrationTestCommons {
public class HttpMultipartFormTest extends IsolatedIntegrationTest {

@Test
public void shouldHandleUploads() throws Throwable {
Expand Down
Expand Up @@ -27,7 +27,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.2.0")
public class HttpNotFoundTest extends IntegrationTestCommons {
public class HttpNotFoundTest extends IsolatedIntegrationTest {

@Test
public void testThrowingNotFound() {
Expand Down
Expand Up @@ -27,7 +27,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class HttpPathMatchingTest extends IntegrationTestCommons {
public class HttpPathMatchingTest extends IsolatedIntegrationTest {

@Test
public void testHttpPathMatching() {
Expand Down
Expand Up @@ -35,7 +35,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.0.10")
public class HttpPojoControllerTest extends IntegrationTestCommons {
public class HttpPojoControllerTest extends IsolatedIntegrationTest {

@SuppressWarnings("unchecked")
@Test
Expand Down
Expand Up @@ -30,7 +30,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class HttpReregistrationTest extends IntegrationTestCommons {
public class HttpReregistrationTest extends IsolatedIntegrationTest {

@Test
public void testControllerDeregistration() {
Expand Down
Expand Up @@ -29,7 +29,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class HttpResponseStreamTest extends IntegrationTestCommons {
public class HttpResponseStreamTest extends IsolatedIntegrationTest {

@Test
public void testOutputStream() {
Expand Down
Expand Up @@ -29,7 +29,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class HttpRolesTest extends IntegrationTestCommons {
public class HttpRolesTest extends IsolatedIntegrationTest {

@Test
public void testRoles() {
Expand Down
Expand Up @@ -30,7 +30,7 @@

@Authors("Nikolche Mihajlovski")
@Since("2.0.0")
public class HttpServerUTF8Test extends IntegrationTestCommons {
public class HttpServerUTF8Test extends IsolatedIntegrationTest {

@Test
public void shouldHandleUTF8() {
Expand Down
Expand Up @@ -28,7 +28,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.0.11")
public class HttpStaticFilesTest extends IntegrationTestCommons {
public class HttpStaticFilesTest extends IsolatedIntegrationTest {

@Test
public void serveStaticFiles() {
Expand Down
Expand Up @@ -27,7 +27,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class HttpWrapTest extends IntegrationTestCommons {
public class HttpWrapTest extends IsolatedIntegrationTest {

@Test
public void testWrap() {
Expand Down
Expand Up @@ -29,7 +29,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.2.0")
public class HttpWrappersTest extends IntegrationTestCommons {
public class HttpWrappersTest extends IsolatedIntegrationTest {

@Test
public void testWrappers() {
Expand Down
Expand Up @@ -29,7 +29,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.2.0")
public class HttpZoneTest extends IntegrationTestCommons {
public class HttpZoneTest extends IsolatedIntegrationTest {

@Test
public void testMainZone() {
Expand Down
@@ -0,0 +1,39 @@
package org.rapidoid.http;

/*
* #%L
* rapidoid-integration-tests
* %%
* Copyright (C) 2014 - 2016 Nikolche Mihajlovski and contributors
* %%
* 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.
* #L%
*/

import org.junit.Before;
import org.rapidoid.annotation.Authors;
import org.rapidoid.annotation.Since;
import org.rapidoid.commons.Env;
import org.rapidoid.config.Conf;

@Authors("Nikolche Mihajlovski")
@Since("5.2.5")
public abstract class IsolatedIntegrationTest extends IntegrationTestCommons {

@Before
public void resetEnvCfg() {
Env.reset();
Conf.reset();
}

}
Expand Up @@ -27,7 +27,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.2.3")
public class ReverseProxyTest extends IntegrationTestCommons {
public class ReverseProxyTest extends IsolatedIntegrationTest {

@Test
public void testRoutingPerPath() {
Expand Down
Expand Up @@ -34,7 +34,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class WithContextTest extends IntegrationTestCommons {
public class WithContextTest extends IsolatedIntegrationTest {

public static final int JOB_COUNT = 1000;

Expand Down
Expand Up @@ -23,15 +23,15 @@
import org.junit.Test;
import org.rapidoid.annotation.Authors;
import org.rapidoid.annotation.Since;
import org.rapidoid.http.IntegrationTestCommons;
import org.rapidoid.http.IsolatedIntegrationTest;
import org.rapidoid.http.processor.HttpProcessor;
import org.rapidoid.http.processor.LoggingHttpProcessor;
import org.rapidoid.http.processor.NotFoundHttpProcessor;
import org.rapidoid.net.Server;

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class FastHttpProcessorsTest extends IntegrationTestCommons {
public class FastHttpProcessorsTest extends IsolatedIntegrationTest {

@Test
public void testChainOfHttpProcessors() {
Expand Down
Expand Up @@ -25,7 +25,7 @@
import org.rapidoid.annotation.Since;
import org.rapidoid.config.ConfigImpl;
import org.rapidoid.http.FastHttp;
import org.rapidoid.http.IntegrationTestCommons;
import org.rapidoid.http.IsolatedIntegrationTest;
import org.rapidoid.http.Req;
import org.rapidoid.http.customize.Customization;
import org.rapidoid.http.impl.HttpRoutesImpl;
Expand All @@ -35,7 +35,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class HttpHandlerTest extends IntegrationTestCommons {
public class HttpHandlerTest extends IsolatedIntegrationTest {

@Test
public void testFastHttpHandler() {
Expand Down
Expand Up @@ -4,7 +4,7 @@
import org.rapidoid.annotation.Authors;
import org.rapidoid.annotation.Since;
import org.rapidoid.fluent.Flow;
import org.rapidoid.http.IntegrationTestCommons;
import org.rapidoid.http.IsolatedIntegrationTest;
import org.rapidoid.setup.On;
import org.rapidoid.u.U;
import org.rapidoid.util.Msc;
Expand All @@ -31,7 +31,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.7")
public class InvalidUrlDecodedParamsTest extends IntegrationTestCommons {
public class InvalidUrlDecodedParamsTest extends IsolatedIntegrationTest {

@Test
public void testWithInvalidEncoding() {
Expand Down
Expand Up @@ -25,7 +25,7 @@
import org.rapidoid.annotation.Authors;
import org.rapidoid.annotation.Since;
import org.rapidoid.config.Conf;
import org.rapidoid.http.IntegrationTestCommons;
import org.rapidoid.http.IsolatedIntegrationTest;
import org.rapidoid.sql.C3P0ConnectionPool;
import org.rapidoid.sql.JDBC;
import org.rapidoid.u.U;
Expand All @@ -35,7 +35,7 @@

@Authors("Nikolche Mihajlovski")
@Since("4.1.0")
public class JDBCPoolC3P0Test extends IntegrationTestCommons {
public class JDBCPoolC3P0Test extends IsolatedIntegrationTest {

@Test(timeout = 30000)
public void testJDBCPoolC3P0() {
Expand Down
Expand Up @@ -20,25 +20,17 @@
* #L%
*/

import org.junit.Before;
import org.junit.Test;
import org.rapidoid.annotation.Authors;
import org.rapidoid.annotation.Since;
import org.rapidoid.commons.Env;
import org.rapidoid.config.Conf;
import org.rapidoid.http.IntegrationTestCommons;
import org.rapidoid.http.IsolatedIntegrationTest;
import org.rapidoid.setup.App;
import org.rapidoid.sql.JDBC;

@Authors("Nikolche Mihajlovski")
@Since("5.2.5")
public class SqlRoutesTest extends IntegrationTestCommons {

@Before
public void reset() {
Env.reset();
Conf.reset();
}
public class SqlRoutesTest extends IsolatedIntegrationTest {

@Test
public void testSqlRoutes() {
Expand Down
Expand Up @@ -3,7 +3,7 @@
import org.junit.Test;
import org.rapidoid.annotation.Authors;
import org.rapidoid.annotation.Since;
import org.rapidoid.http.IntegrationTestCommons;
import org.rapidoid.http.IsolatedIntegrationTest;
import org.rapidoid.setup.On;
import org.rapidoid.u.U;

Expand All @@ -29,7 +29,7 @@

@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public class HttpTransactionTest extends IntegrationTestCommons {
public class HttpTransactionTest extends IsolatedIntegrationTest {

@Test
public void testWebTx() {
Expand Down

0 comments on commit 3196083

Please sign in to comment.