Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename tests so they are run by surefire

  • Loading branch information...
commit f7b838109c86cc3c2eea9355b5ad92ddee99d3bb 1 parent dabae2a
@andrewcox andrewcox authored
Showing with 32 additions and 26 deletions.
  1. +1 −1  swift-service/src/test/java/com/facebook/swift/service/async/{AsyncClient.java → AsyncClientTest.java}
  2. +1 −1  ...rvice/src/test/java/com/facebook/swift/service/async/{AsyncHttpClient.java → AsyncHttpClientTest.java}
  3. +4 −3 swift-service/src/test/java/com/facebook/swift/service/base/{TestSuiteBase.java → SuiteBase.java}
  4. +2 −1  ...service/src/test/java/com/facebook/swift/service/exceptions/{TestService.java → ExceptionService.java}
  5. +1 −1  ...test/java/com/facebook/swift/service/exceptions/{TestServiceClient.java → ExceptionServiceClient.java}
  6. +2 −1  ...st/java/com/facebook/swift/service/exceptions/{TestServiceHandler.java → ExceptionServiceHandler.java}
  7. +5 −4 ...ice/src/test/java/com/facebook/swift/service/exceptions/{ExceptionTestSuite.java → ExceptionTest.java}
  8. +1 −1  ...ook/swift/service/explicitidentifiers/{TestServiceClient.java → ExplicitIdentifiersServiceClient.java}
  9. +1 −1  ...k/swift/service/explicitidentifiers/{TestServiceHandler.java → ExplicitIdentifiersServiceHandler.java}
  10. +4 −4 ...k/swift/service/explicitidentifiers/{ExplicitIdentifiersTestSuite.java → ExplicitIdentifiersTest.java}
  11. +2 −1  swift-service/src/test/java/com/facebook/swift/service/oneway/{TestService.java → OneWayService.java}
  12. +1 −1  ...ce/src/test/java/com/facebook/swift/service/oneway/{TestServiceClient.java → OneWayServiceClient.java}
  13. +2 −1  .../src/test/java/com/facebook/swift/service/oneway/{TestServiceHandler.java → OneWayServiceHandler.java}
  14. +4 −4 swift-service/src/test/java/com/facebook/swift/service/oneway/{OnewayTestSuite.java → OnewayTest.java}
  15. +1 −1  ...service/src/test/java/com/facebook/swift/service/unframed/{UnframedTestSuite.java → UnframedTest.java}
View
2  ...com/facebook/swift/service/async/AsyncClient.java → ...facebook/swift/service/async/AsyncClientTest.java
@@ -40,7 +40,7 @@
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.fail;
-public class AsyncClient extends AsyncTestBase
+public class AsyncClientTest extends AsyncTestBase
{
protected ThriftServer syncServer;
View
2  ...facebook/swift/service/async/AsyncHttpClient.java → ...book/swift/service/async/AsyncHttpClientTest.java
@@ -33,7 +33,7 @@
import static org.testng.Assert.assertEquals;
-public class AsyncHttpClient extends AsyncTestBase
+public class AsyncHttpClientTest extends AsyncTestBase
{
// Test a simple sync client call through HTTP (in this case, to a TServlet running under Jetty)
@Test
View
7 ...om/facebook/swift/service/base/TestSuiteBase.java → ...va/com/facebook/swift/service/base/SuiteBase.java
@@ -30,7 +30,7 @@
import java.util.concurrent.ExecutionException;
-public class TestSuiteBase<ServiceInterface, ClientInterface> {
+public class SuiteBase<ServiceInterface, ClientInterface> {
private ThriftCodecManager codecManager = new ThriftCodecManager();
private ThriftClientManager clientManager;
private Class<? extends ClientInterface> clientClass;
@@ -39,8 +39,9 @@
private ThriftServer server;
private ServiceInterface handler;
- public TestSuiteBase(Class<? extends ServiceInterface> handlerClass,
- Class<? extends ClientInterface> clientClass) {
+ public SuiteBase(
+ Class<? extends ServiceInterface> handlerClass,
+ Class<? extends ClientInterface> clientClass) {
this.clientClass = clientClass;
this.handlerClass = handlerClass;
}
View
3  ...acebook/swift/service/exceptions/TestService.java → ...ok/swift/service/exceptions/ExceptionService.java
@@ -21,7 +21,8 @@
import org.apache.thrift.TException;
@ThriftService
-public interface TestService {
+public interface ExceptionService
+{
@ThriftMethod(exception = { @ThriftException(type = ThriftCheckedException.class, id = 1) })
public void throwExpectedThriftCheckedException() throws ThriftCheckedException,
View
2  ...k/swift/service/exceptions/TestServiceClient.java → ...ft/service/exceptions/ExceptionServiceClient.java
@@ -15,7 +15,7 @@
*/
package com.facebook.swift.service.exceptions;
-public interface TestServiceClient extends TestService, AutoCloseable {
+public interface ExceptionServiceClient extends ExceptionService, AutoCloseable {
@Override
public void close();
}
View
3  .../swift/service/exceptions/TestServiceHandler.java → ...t/service/exceptions/ExceptionServiceHandler.java
@@ -17,7 +17,8 @@
import org.apache.thrift.TException;
-public class TestServiceHandler implements TestService {
+public class ExceptionServiceHandler implements ExceptionService
+{
@Override
public void throwExpectedThriftCheckedException()
throws TException, ThriftCheckedException {
View
9 .../swift/service/exceptions/ExceptionTestSuite.java → ...ebook/swift/service/exceptions/ExceptionTest.java
@@ -15,14 +15,15 @@
*/
package com.facebook.swift.service.exceptions;
-import com.facebook.swift.service.base.TestSuiteBase;
+import com.facebook.swift.service.base.SuiteBase;
import org.apache.thrift.TApplicationException;
import org.apache.thrift.TException;
import org.testng.annotations.Test;
-public class ExceptionTestSuite extends TestSuiteBase<TestService, TestService> {
- public ExceptionTestSuite() {
- super(TestServiceHandler.class, TestServiceClient.class);
+public class ExceptionTest extends SuiteBase<ExceptionService, ExceptionService>
+{
+ public ExceptionTest() {
+ super(ExceptionServiceHandler.class, ExceptionServiceClient.class);
}
@Test(expectedExceptions = { ThriftCheckedException.class })
View
2  ...ervice/explicitidentifiers/TestServiceClient.java → ...identifiers/ExplicitIdentifiersServiceClient.java
@@ -23,7 +23,7 @@
import java.io.Closeable;
@ThriftService
-public interface TestServiceClient extends Closeable
+public interface ExplicitIdentifiersServiceClient extends Closeable
{
public void close();
View
2  ...rvice/explicitidentifiers/TestServiceHandler.java → ...dentifiers/ExplicitIdentifiersServiceHandler.java
@@ -21,7 +21,7 @@
import com.google.common.base.Optional;
@ThriftService
-public class TestServiceHandler
+public class ExplicitIdentifiersServiceHandler
{
private Object lastStringParam;
private Object lastBooleanParam;
View
8 ...icitidentifiers/ExplicitIdentifiersTestSuite.java → .../explicitidentifiers/ExplicitIdentifiersTest.java
@@ -15,18 +15,18 @@
*/
package com.facebook.swift.service.explicitidentifiers;
-import com.facebook.swift.service.base.TestSuiteBase;
+import com.facebook.swift.service.base.SuiteBase;
import org.apache.thrift.TException;
import org.testng.annotations.Test;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
-public class ExplicitIdentifiersTestSuite extends TestSuiteBase<TestServiceHandler, TestServiceClient>
+public class ExplicitIdentifiersTest extends SuiteBase<ExplicitIdentifiersServiceHandler, ExplicitIdentifiersServiceClient>
{
- public ExplicitIdentifiersTestSuite()
+ public ExplicitIdentifiersTest()
{
- super(TestServiceHandler.class, TestServiceClient.class);
+ super(ExplicitIdentifiersServiceHandler.class, ExplicitIdentifiersServiceClient.class);
}
// Client passes all parameters, but in a different order than the server expects
View
3  ...om/facebook/swift/service/oneway/TestService.java → .../facebook/swift/service/oneway/OneWayService.java
@@ -20,7 +20,8 @@
import org.apache.thrift.TException;
@ThriftService
-public interface TestService {
+public interface OneWayService
+{
@ThriftMethod
public void verifyConnectionState() throws TException;
View
2  ...ebook/swift/service/oneway/TestServiceClient.java → ...ook/swift/service/oneway/OneWayServiceClient.java
@@ -15,7 +15,7 @@
*/
package com.facebook.swift.service.oneway;
-public interface TestServiceClient extends TestService, AutoCloseable {
+public interface OneWayServiceClient extends OneWayService, AutoCloseable {
@Override
public void close();
}
View
3  ...book/swift/service/oneway/TestServiceHandler.java → ...ok/swift/service/oneway/OneWayServiceHandler.java
@@ -17,7 +17,8 @@
import org.apache.thrift.TException;
-public class TestServiceHandler implements TestService {
+public class OneWayServiceHandler implements OneWayService
+{
@Override
public void verifyConnectionState() throws TException {
// do nothing, used only to verify two-way communication still works
View
8 ...acebook/swift/service/oneway/OnewayTestSuite.java → ...com/facebook/swift/service/oneway/OnewayTest.java
@@ -15,17 +15,17 @@
*/
package com.facebook.swift.service.oneway;
-import com.facebook.swift.service.base.TestSuiteBase;
+import com.facebook.swift.service.base.SuiteBase;
import org.apache.thrift.TException;
import org.testng.annotations.Test;
@Test
-public class OnewayTestSuite extends TestSuiteBase<TestService, TestService>
+public class OnewayTest extends SuiteBase<OneWayService, OneWayService>
{
- public OnewayTestSuite()
+ public OnewayTest()
{
- super(TestServiceHandler.class, TestServiceClient.class);
+ super(OneWayServiceHandler.class, OneWayServiceClient.class);
}
@Test
View
2  ...ook/swift/service/unframed/UnframedTestSuite.java → ...facebook/swift/service/unframed/UnframedTest.java
@@ -38,7 +38,7 @@
import static org.testng.Assert.assertEquals;
-public class UnframedTestSuite
+public class UnframedTest
{
@Test
public void testUnframedSyncMethod()
Please sign in to comment.
Something went wrong with that request. Please try again.