test: add test for more than 2 measurements
This commit is contained in:
@@ -14,6 +14,7 @@ class K8sRuntimeEstimatorTest extends Specification {
|
|||||||
|
|
||||||
then:
|
then:
|
||||||
estimation != Double.POSITIVE_INFINITY
|
estimation != Double.POSITIVE_INFINITY
|
||||||
|
estimation == 1234.0
|
||||||
}
|
}
|
||||||
|
|
||||||
def 'can extract a function from single measurement' () {
|
def 'can extract a function from single measurement' () {
|
||||||
@@ -39,4 +40,16 @@ class K8sRuntimeEstimatorTest extends Specification {
|
|||||||
then:
|
then:
|
||||||
estimation == Double.POSITIVE_INFINITY
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user