test: add test for more than 2 measurements

This commit is contained in:
2026-06-08 23:32:20 +02:00
parent b92feeab5b
commit 28466b2b54

View File

@@ -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
}
}