diff --git a/theodolite/crd/crd-benchmark.yaml b/theodolite/crd/crd-benchmark.yaml index 394d6cc580f7d70e3c201fcc905129bbb94f45d8..e3d7f8a97abdc046a7dca297aa3777bfa48e5e53 100644 --- a/theodolite/crd/crd-benchmark.yaml +++ b/theodolite/crd/crd-benchmark.yaml @@ -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. diff --git a/theodolite/examples/operator/example-benchmark.yaml b/theodolite/examples/operator/example-benchmark.yaml index b66852b1d82471b6566de9d6d789ccda67524e49..efb3737d892c151503b84b236fcdd58b17331d2b 100644 --- a/theodolite/examples/operator/example-benchmark.yaml +++ b/theodolite/examples/operator/example-benchmark.yaml @@ -22,7 +22,7 @@ spec: app: busybox1 exec: command: ["rm", "test-folder"] - timeout: 90 + timeoutSeconds: 90 loadGenerator: resources: - configMap: diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/Action.kt b/theodolite/src/main/kotlin/theodolite/benchmark/Action.kt index edbffea368ab7cf4dda03b6663ab9ec3c7a41d3f..35efebdc0fb2a3748660cb76cdd5499b4ca5f622 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/Action.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/Action.kt @@ -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 diff --git a/theodolite/src/main/kotlin/theodolite/benchmark/ActionCommand.kt b/theodolite/src/main/kotlin/theodolite/benchmark/ActionCommand.kt index f1feeaeb45dcef6f35010e561b295af56aec4e1d..c6a3f2726ffd945ddf5ab6038dee76df15781197 100644 --- a/theodolite/src/main/kotlin/theodolite/benchmark/ActionCommand.kt +++ b/theodolite/src/main/kotlin/theodolite/benchmark/ActionCommand.kt @@ -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() diff --git a/theodolite/src/main/kotlin/theodolite/util/Configuration.kt b/theodolite/src/main/kotlin/theodolite/util/Configuration.kt index 97fffb8c91b6e84e548b840acb5402ea6bf43e56..7b1232cd9ba72344cdb438f974cd6c4d17fd690d 100644 --- a/theodolite/src/main/kotlin/theodolite/util/Configuration.kt +++ b/theodolite/src/main/kotlin/theodolite/util/Configuration.kt @@ -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 } } diff --git a/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt b/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt index 9abc5ae5a2bf402f06b1733d5089b4951440ff3d..3ec361e4190233235a9ed2b7c7dfb6ca3ecf8eff 100644 --- a/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt +++ b/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt @@ -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) } } }