diff --git a/nextflow/plugins/nf-k8s/src/test/nextflow/k8s/K8sRuntimeEstimatorTest.groovy b/nextflow/plugins/nf-k8s/src/test/nextflow/k8s/K8sRuntimeEstimatorTest.groovy index f93a6b9..70fcbfd 100644 --- a/nextflow/plugins/nf-k8s/src/test/nextflow/k8s/K8sRuntimeEstimatorTest.groovy +++ b/nextflow/plugins/nf-k8s/src/test/nextflow/k8s/K8sRuntimeEstimatorTest.groovy @@ -14,6 +14,7 @@ class K8sRuntimeEstimatorTest extends Specification { then: estimation != Double.POSITIVE_INFINITY + estimation == 1234.0 } def 'can extract a function from single measurement' () { @@ -39,4 +40,16 @@ class K8sRuntimeEstimatorTest extends Specification { then: estimation == Double.POSITIVE_INFINITY } + + def 'extracts function from multiple measurements' () { + given: + def observations = [a: [new Tuple2(10, 15), new Tuple2(20, 34), new Tuple2(30, 46)]] + def estimator = new K8sRuntimeEstimator(observations) + + when: + def estimation = estimator.estimate("a", 40) + + then: + estimation != Double.POSITIVE_INFINITY + } }