Skip to content
Snippets Groups Projects
Commit e05616cb authored by Benedikt Wetzel's avatar Benedikt Wetzel
Browse files

Rename property timeout to timeoutSeconds

parent 96c3e7d0
No related branches found
No related tags found
1 merge request!201Introduce action commands
......@@ -90,7 +90,7 @@ spec:
type: array
items:
type: string
timeout:
timeoutSeconds:
type: integer
afterActions:
type: array
......@@ -118,7 +118,7 @@ spec:
type: array
items:
type: string
timeout:
timeoutSeconds:
type: integer
sut:
description: The appResourceSets specifies all Kubernetes resources required to start the sut. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet.
......@@ -183,7 +183,7 @@ spec:
type: array
items:
type: string
timeout:
timeoutSeconds:
type: integer
afterActions:
type: array
......@@ -211,7 +211,7 @@ spec:
type: array
items:
type: string
timeout:
timeoutSeconds:
type: integer
loadGenerator:
description: The loadGenResourceSets specifies all Kubernetes resources required to start the load generator. A resourceSet can be either a configMap resourceSet or a fileSystem resourceSet.
......@@ -276,7 +276,7 @@ spec:
type: array
items:
type: string
timeout:
timeoutSeconds:
type: integer
afterActions:
type: array
......@@ -304,7 +304,7 @@ spec:
type: array
items:
type: string
timeout:
timeoutSeconds:
type: integer
resourceTypes:
description: A list of resource types that can be scaled for this `benchmark` resource. For each resource type the concrete values are defined in the `execution` object.
......
......@@ -22,7 +22,7 @@ spec:
app: busybox1
exec:
command: ["rm", "test-folder"]
timeout: 90
timeoutSeconds: 90
loadGenerator:
resources:
- configMap:
......
......@@ -20,7 +20,7 @@ class Action {
.exec(
matchLabels = selector.pod.matchLabels,
container = selector.container,
timeout = exec.timeout,
timeout = exec.timeoutSeconds,
command = exec.command
)
if(exitCode != 0){
......@@ -44,5 +44,5 @@ class PodSelector {
@RegisterForReflection
class Command {
lateinit var command: Array<String>
var timeout: Long = Configuration.TIMEOUT
var timeoutSeconds: Long = Configuration.TIMEOUT_SECONDS
}
\ No newline at end of file
......@@ -32,7 +32,7 @@ class ActionCommand(val client: NamespacedKubernetesClient) {
fun exec(
matchLabels: MutableMap<String, String>,
command: Array<String>,
timeout: Long = Configuration.TIMEOUT,
timeout: Long = Configuration.TIMEOUT_SECONDS,
container: String = ""
): Int {
val exitCode = ExitCode()
......
......@@ -17,7 +17,7 @@ class Configuration(
/**
* Specifies how long Theodolite should wait (in sec) before aborting the execution of an action command.
*/
const val TIMEOUT: Long = 30L
const val TIMEOUT_SECONDS: Long = 30L
}
}
......@@ -118,7 +118,7 @@ class ActionCommandTest {
action.selector.pod.matchLabels = mutableMapOf("app" to "pod")
action.exec = Command()
action.exec.command = arrayOf("ls")
action.exec.timeout = 10L
action.exec.timeoutSeconds = 10L
assertThrows<ActionCommandFailedException> { run { action.exec(server.client) } }
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment