Skip to content

Commit 0bce219

Browse files
wdscheiwdschei
authored andcommitted
Removed all of the things that were explicitly killing parallel functional tests.
1 parent 6d17bae commit 0bce219

File tree

3 files changed

+2
-74
lines changed

3 files changed

+2
-74
lines changed

repose-aggregator/tests/functional-test-framework/src/main/groovy/org/openrepose/framework/test/ReposeContainerLauncher.groovy

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -126,39 +126,12 @@ class ReposeContainerLauncher extends ReposeLauncher {
126126
println()
127127
} catch (IOException ioex) {
128128
this.process.waitForOrKill(5000)
129-
killIfUp()
130129
if (throwExceptionOnKill) {
131130
throw new TimeoutException("An error occurred while attempting to stop Repose Controller. Reason: " + ioex.getMessage())
132131
}
133132
}
134133
}
135134

136-
private void killIfUp() {
137-
String processes = TestUtils.getJvmProcesses()
138-
def regex = /(\d*) ROOT.war .*/
139-
def matcher = (processes =~ regex)
140-
if (matcher.size() > 0) {
141-
142-
for (int i = 1; i <= matcher.size(); i++) {
143-
String pid = matcher[0][i]
144-
145-
if (pid != null && !pid.isEmpty()) {
146-
println("Killing running repose-valve process: " + pid)
147-
Runtime rt = Runtime.getRuntime()
148-
if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1)
149-
rt.exec("taskkill " + pid.toInteger())
150-
else
151-
rt.exec("kill -9 " + pid.toInteger())
152-
}
153-
}
154-
}
155-
}
156-
157-
@Override
158-
boolean areAnyUp() {
159-
return TestUtils.getJvmProcesses().contains("ROOT.war")
160-
}
161-
162135
@Override
163136
void enableDebug() {
164137
this.debugEnabled = true

repose-aggregator/tests/functional-test-framework/src/main/groovy/org/openrepose/framework/test/ReposeLauncher.groovy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ abstract class ReposeLauncher {
3636

3737
abstract void enableDebug()
3838

39-
abstract boolean areAnyUp()
40-
4139
boolean isUp() {
4240
this.process?.isAlive() ?: false
4341
}

repose-aggregator/tests/functional-test-framework/src/main/groovy/org/openrepose/framework/test/ReposeValveLauncher.groovy

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ class ReposeValveLauncher extends ReposeLauncher {
7979
}
8080

8181
void start(Map params) {
82-
83-
boolean killOthersBeforeStarting = true
84-
if (params.containsKey("killOthersBeforeStarting")) {
85-
killOthersBeforeStarting = params.killOthersBeforeStarting
86-
}
8782
boolean waitOnJmxAfterStarting = true
8883
if (params.containsKey("waitOnJmxAfterStarting")) {
8984
waitOnJmxAfterStarting = params.waitOnJmxAfterStarting
@@ -92,15 +87,14 @@ class ReposeValveLauncher extends ReposeLauncher {
9287
String clusterId = params.get('clusterId', "")
9388
String nodeId = params.get('nodeId', "")
9489

95-
start(killOthersBeforeStarting, waitOnJmxAfterStarting, clusterId, nodeId)
90+
start(waitOnJmxAfterStarting, clusterId, nodeId)
9691
}
9792

9893
/**
9994
* TODO: need to know what node in the system model we care about. There might be many, for multiple local node testing...
100-
* @param killOthersBeforeStarting
10195
* @param waitOnJmxAfterStarting
10296
*/
103-
void start(boolean killOthersBeforeStarting, boolean waitOnJmxAfterStarting, String clusterId, String nodeId) {
97+
void start(boolean waitOnJmxAfterStarting, String clusterId, String nodeId) {
10498

10599
File jarFile = new File(reposeJar)
106100
if (!jarFile.exists() || !jarFile.isFile()) {
@@ -112,13 +106,6 @@ class ReposeValveLauncher extends ReposeLauncher {
112106
throw new FileNotFoundException("Missing or invalid configuration folder.")
113107
}
114108

115-
if (killOthersBeforeStarting) {
116-
waitForCondition(clock, '5s', '1s') {
117-
killIfUp()
118-
!isUp()
119-
}
120-
}
121-
122109
def debugProps = ""
123110
def jacocoProps = ""
124111
def classPath = ""
@@ -228,12 +215,9 @@ class ReposeValveLauncher extends ReposeLauncher {
228215
println()
229216
} catch (IOException ioex) {
230217
this.process.waitForOrKill(5000)
231-
killIfUp()
232218
if (throwExceptionOnKill) {
233219
throw new TimeoutException("An error occurred while attempting to stop Repose Controller. Reason: ${ioex.getMessage()}")
234220
}
235-
} finally {
236-
configurationProvider.cleanConfigDirectory()
237221
}
238222
}
239223

@@ -305,31 +289,4 @@ class ReposeValveLauncher extends ReposeLauncher {
305289
def nodeIsReady = jmx.server.invoke(new ObjectName(beanName), "isNodeReady", opParams, opSignature)
306290
return nodeIsReady
307291
}
308-
309-
@Override
310-
boolean areAnyUp() {
311-
println TestUtils.getJvmProcesses()
312-
return TestUtils.getJvmProcesses().contains("repose-valve.jar")
313-
}
314-
315-
private static void killIfUp() {
316-
String processes = TestUtils.getJvmProcesses()
317-
def regex = /(\d*) repose-valve.jar .*spocktest .*/
318-
def matcher = (processes =~ regex)
319-
if (matcher.size() > 0) {
320-
321-
for (int i = 1; i <= matcher.size(); i++) {
322-
String pid = matcher[0][i]
323-
324-
if (pid != null && !pid.isEmpty()) {
325-
println("Killing running repose-valve process: " + pid)
326-
Runtime rt = Runtime.getRuntime();
327-
if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1)
328-
rt.exec("taskkill " + pid.toInteger());
329-
else
330-
rt.exec("kill -9 " + pid.toInteger());
331-
}
332-
}
333-
}
334-
}
335292
}

0 commit comments

Comments
 (0)