Add (ignored) test suite for probing ordering issues

This commit is contained in:
Dave Syer
2017-01-05 16:43:24 +00:00
parent 0715d29efa
commit 9e7885c76a
2 changed files with 44 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
/*
* Copyright 2012-2015 the original author or authors.
*
* 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.
*/
package org.springframework.cloud.function.deployer;
import org.junit.Ignore;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
* A test suite for probing weird ordering problems in the tests.
*
* @author Dave Syer
*/
@RunWith(Suite.class)
@SuiteClasses({ FunctionAppDeployerTests.class,
FunctionExtractingFunctionCatalogIntegrationTests.class })
@Ignore
public class AdhocTestSuite {
}

View File

@@ -18,6 +18,7 @@ package org.springframework.cloud.function.deployer;
import java.util.Arrays;
import java.util.Collections;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -59,6 +60,13 @@ public class FunctionExtractingFunctionCatalogTests {
}
}
@AfterClass
public static void close() {
if (id != null) {
deployer.undeploy(id);
}
}
@Test
public void deployAndExtractFunctions() throws Exception {
// This one can only work if you change the boot classpath to contain reactor-core
@@ -80,7 +88,7 @@ public class FunctionExtractingFunctionCatalogTests {
assertThat(deployer.lookupSupplier("words")).isNotNull();
}
private String deploy(String jarName, String... args) throws Exception {
private static String deploy(String jarName, String... args) throws Exception {
Resource resource = new FileSystemResource(
ArchiveUtils.getArchiveRoot(ArchiveUtils.getArchive(jarName)));
AppDefinition definition = new AppDefinition(resource.getFilename(),