Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core/test): fix test placeholders to show unrolled iteration names during upgrade to groovy 3.x #992

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

j-sandy
Copy link
Contributor

@j-sandy j-sandy commented Oct 3, 2023

While upgrading groovy 3.0.10 and spockframework 2.0-groovy-3.0, encounter below error in test execution of kayenta-core module:

Error in @Unroll expression: controlMetricSet
	at app//org.spockframework.runtime.extension.builtin.UnrollIterationNameProvider.evaluateExpression(UnrollIterationNameProvider.java:100)
	at app//org.spockframework.runtime.extension.builtin.UnrollIterationNameProvider.nameFor(UnrollIterationNameProvider.java:55)
	at app//org.spockframework.runtime.extension.builtin.UnrollIterationNameProvider.getName(UnrollIterationNameProvider.java:46)
	at app//org.spockframework.runtime.extension.builtin.UnrollIterationNameProvider.getName(UnrollIterationNameProvider.java:30)
	at app//org.spockframework.runtime.SafeIterationNameProvider.getName(SafeIterationNameProvider.java:33)
	at app//org.spockframework.runtime.SafeIterationNameProvider.getName(SafeIterationNameProvider.java:21)
	at app//org.spockframework.runtime.PlatformSpecRunner.createIterationInfo(PlatformSpecRunner.java:230)
	at app//org.spockframework.runtime.PlatformParameterizedSpecRunner.runIterations(PlatformParameterizedSpecRunner.java:178)
	at app//org.spockframework.runtime.PlatformParameterizedSpecRunner.runParameterizedFeature(PlatformParameterizedSpecRunner.java:45)
	at app//org.spockframework.runtime.ParameterizedFeatureNode.execute(ParameterizedFeatureNode.java:40)
	at app//org.spockframework.runtime.ParameterizedFeatureNode.execute(ParameterizedFeatureNode.java:16)
	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
	at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at app//org.spockframework.runtime.SpockNode.sneakyInvoke(SpockNode.java:40)
	....
Caused by: java.lang.IllegalArgumentException: Metric set name was not set.
	at com.netflix.kayenta.metrics.MetricSet.getMetricSetKey(MetricSet.java:80)
	at com.netflix.kayenta.metrics.MetricSet.toString(MetricSet.java:29)
	at org.codehaus.groovy.runtime.InvokerHelper.format(InvokerHelper.java:677)
	at org.codehaus.groovy.runtime.InvokerHelper.toString(InvokerHelper.java:152)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.toString(DefaultGroovyMethods.java:15713)
	at org.spockframework.runtime.GroovyRuntimeUtil.toString(GroovyRuntimeUtil.java:74)
	at org.spockframework.util.RenderUtil.toStringOrDump(RenderUtil.java:49)
	at org.spockframework.runtime.extension.builtin.UnrollIterationNameProvider.evaluateExpression(UnrollIterationNameProvider.java:97)
	... 86 more

To fix this issue put the qualified placeholder with name field.

… names during upgrade to groovy 3.x

While upgrading groovy 3.0.10 and spockframework 2.0-groovy-3.0, encounter below error in test execution of kayenta-core module:

```
Error in @unroll expression: controlMetricSet
	at app//org.spockframework.runtime.extension.builtin.UnrollIterationNameProvider.evaluateExpression(UnrollIterationNameProvider.java:100)
	at app//org.spockframework.runtime.extension.builtin.UnrollIterationNameProvider.nameFor(UnrollIterationNameProvider.java:55)
	at app//org.spockframework.runtime.extension.builtin.UnrollIterationNameProvider.getName(UnrollIterationNameProvider.java:46)
	at app//org.spockframework.runtime.extension.builtin.UnrollIterationNameProvider.getName(UnrollIterationNameProvider.java:30)
	at app//org.spockframework.runtime.SafeIterationNameProvider.getName(SafeIterationNameProvider.java:33)
	at app//org.spockframework.runtime.SafeIterationNameProvider.getName(SafeIterationNameProvider.java:21)
	at app//org.spockframework.runtime.PlatformSpecRunner.createIterationInfo(PlatformSpecRunner.java:230)
	at app//org.spockframework.runtime.PlatformParameterizedSpecRunner.runIterations(PlatformParameterizedSpecRunner.java:178)
	at app//org.spockframework.runtime.PlatformParameterizedSpecRunner.runParameterizedFeature(PlatformParameterizedSpecRunner.java:45)
	at app//org.spockframework.runtime.ParameterizedFeatureNode.execute(ParameterizedFeatureNode.java:40)
	at app//org.spockframework.runtime.ParameterizedFeatureNode.execute(ParameterizedFeatureNode.java:16)
	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
	at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at app//org.spockframework.runtime.SpockNode.sneakyInvoke(SpockNode.java:40)
	....
Caused by: java.lang.IllegalArgumentException: Metric set name was not set.
	at com.netflix.kayenta.metrics.MetricSet.getMetricSetKey(MetricSet.java:80)
	at com.netflix.kayenta.metrics.MetricSet.toString(MetricSet.java:29)
	at org.codehaus.groovy.runtime.InvokerHelper.format(InvokerHelper.java:677)
	at org.codehaus.groovy.runtime.InvokerHelper.toString(InvokerHelper.java:152)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.toString(DefaultGroovyMethods.java:15713)
	at org.spockframework.runtime.GroovyRuntimeUtil.toString(GroovyRuntimeUtil.java:74)
	at org.spockframework.util.RenderUtil.toStringOrDump(RenderUtil.java:49)
	at org.spockframework.runtime.extension.builtin.UnrollIterationNameProvider.evaluateExpression(UnrollIterationNameProvider.java:97)
	... 86 more
```
To fix this issue put the qualified placeholder with name field.
@dbyron-sf dbyron-sf added the ready to merge Reviewed and ready for merge label Oct 3, 2023
@mergify mergify bot added the auto merged label Oct 3, 2023
@mergify mergify bot merged commit 0a1502c into spinnaker:master Oct 3, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants