Skip to content

fix: trim whitespace when parsing numeric properties #2760

fix: trim whitespace when parsing numeric properties

fix: trim whitespace when parsing numeric properties #2760

Triggered via pull request May 30, 2024 14:38
Status Failure
Total duration 31m 10s
Artifacts

main.yml

on: pull_request
Matrix Preparation
4s
Matrix Preparation
Error Prone (JDK 17)
7m 28s
Error Prone (JDK 17)
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

16 errors and 5 warnings
17, oracle, same hashcode, windows, Pacific/Chatham, de_DE, stress JIT: src\core\src\test\kotlin\org\apache\jmeter\threads\ThreadGroupTest.kt#L1
Replace 61 lines 1..59 with /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jmeter.threads import org.apache.jmeter.control.LoopController ...41 more lines
17, oracle, same hashcode, windows, Pacific/Chatham, de_DE, stress JIT: task ':src:core:autostyleKotlinCheck'#L1
Execution failed for task ':src:core:autostyleKotlinCheck': See 'What went wrong' below
17, oracle, same hashcode, windows, Pacific/Chatham, de_DE, stress JIT
Execution failed for task ':src:core:autostyleKotlinCheck'. > The following files have format violations: src\test\kotlin\org\apache\jmeter\threads\ThreadGroupTest.kt @@ -1,59 +1,61 @@ -/*\r\n - * Licensed to the Apache Software Foundation (ASF) under one or more\r\n - * contributor license agreements. See the NOTICE file distributed with\r\n - * this work for additional information regarding copyright ownership.\r\n - * The ASF licenses this file to you under the Apache License, Version 2.0\r\n - * (the "License"); you may not use this file except in compliance with\r\n - * the License. You may obtain a copy of the License at\r\n - *\r\n - * http://www.apache.org/licenses/LICENSE-2.0\r\n - *\r\n - * Unless required by applicable law or agreed to in writing, software\r\n - * distributed under the License is distributed on an "AS IS" BASIS,\r\n - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n - * See the License for the specific language governing permissions and\r\n - * limitations under the License.\r\n - */\r\n -\r\n -package org.apache.jmeter.threads\r\n -\r\n -import org.apache.jmeter.control.LoopController\r\n -import org.apache.jmeter.junit.JMeterTestCase\r\n -import org.apache.jmeter.test.assertions.executePlanAndCollectEvents\r\n -import org.apache.jmeter.test.samplers.ThreadSleep\r\n -import org.apache.jmeter.treebuilder.TreeBuilder\r\n -import org.junit.jupiter.api.Assertions.assertEquals\r\n -import org.junit.jupiter.api.Test\r\n -import kotlin.time.Duration.Companion.seconds\r\n -\r\n -class ThreadGroupTest : JMeterTestCase() {\r\n - @test\r\n - fun `threadNum with trailing whitespace`() {\r\n - val events = executePlanAndCollectEvents(10.seconds, fun TreeBuilder.() {\r\n - ThreadGroup::class {\r\n - props {\r\n - it[numThreads] = "1 "\r\n - }\r\n - rampUp = 0\r\n - scheduler = true\r\n - delay = 0\r\n - duration = 1\r\n - setSamplerController(\r\n - LoopController().apply {\r\n - loops = 1\r\n - setContinueForever(false)\r\n - }\r\n - )\r\n -\r\n - ThreadSleep::class {\r\n ... (72 more lines that didn't fit) You might want to adjust -PmaxCheckMessageLines=50 -PmaxFilesToList=10 -PminLinesPerFile=4 to see more violations Run './gradlew autostyleApply' to fix the violations.
21, liberica, windows, America/New_York, tr_TR: src\core\src\test\kotlin\org\apache\jmeter\threads\ThreadGroupTest.kt#L1
Replace 61 lines 1..59 with /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jmeter.threads import org.apache.jmeter.control.LoopController ...41 more lines
21, liberica, windows, America/New_York, tr_TR: task ':src:core:autostyleKotlinCheck'#L1
Execution failed for task ':src:core:autostyleKotlinCheck': See 'What went wrong' below
21, liberica, windows, America/New_York, tr_TR
Execution failed for task ':src:core:autostyleKotlinCheck'. > The following files have format violations: src\test\kotlin\org\apache\jmeter\threads\ThreadGroupTest.kt @@ -1,59 +1,61 @@ -/*\r\n - * Licensed to the Apache Software Foundation (ASF) under one or more\r\n - * contributor license agreements. See the NOTICE file distributed with\r\n - * this work for additional information regarding copyright ownership.\r\n - * The ASF licenses this file to you under the Apache License, Version 2.0\r\n - * (the "License"); you may not use this file except in compliance with\r\n - * the License. You may obtain a copy of the License at\r\n - *\r\n - * http://www.apache.org/licenses/LICENSE-2.0\r\n - *\r\n - * Unless required by applicable law or agreed to in writing, software\r\n - * distributed under the License is distributed on an "AS IS" BASIS,\r\n - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n - * See the License for the specific language governing permissions and\r\n - * limitations under the License.\r\n - */\r\n -\r\n -package org.apache.jmeter.threads\r\n -\r\n -import org.apache.jmeter.control.LoopController\r\n -import org.apache.jmeter.junit.JMeterTestCase\r\n -import org.apache.jmeter.test.assertions.executePlanAndCollectEvents\r\n -import org.apache.jmeter.test.samplers.ThreadSleep\r\n -import org.apache.jmeter.treebuilder.TreeBuilder\r\n -import org.junit.jupiter.api.Assertions.assertEquals\r\n -import org.junit.jupiter.api.Test\r\n -import kotlin.time.Duration.Companion.seconds\r\n -\r\n -class ThreadGroupTest : JMeterTestCase() {\r\n - @test\r\n - fun `threadNum with trailing whitespace`() {\r\n - val events = executePlanAndCollectEvents(10.seconds, fun TreeBuilder.() {\r\n - ThreadGroup::class {\r\n - props {\r\n - it[numThreads] = "1 "\r\n - }\r\n - rampUp = 0\r\n - scheduler = true\r\n - delay = 0\r\n - duration = 1\r\n - setSamplerController(\r\n - LoopController().apply {\r\n - loops = 1\r\n - setContinueForever(false)\r\n - }\r\n - )\r\n -\r\n - ThreadSleep::class {\r\n ... (72 more lines that didn't fit) You might want to adjust -PmaxCheckMessageLines=50 -PmaxFilesToList=10 -PminLinesPerFile=4 to see more violations Run './gradlew autostyleApply' to fix the violations.
21, corretto, windows, Pacific/Chatham, de_DE, stress JIT: src\core\src\test\kotlin\org\apache\jmeter\threads\ThreadGroupTest.kt#L1
Replace 61 lines 1..59 with /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jmeter.threads import org.apache.jmeter.control.LoopController ...41 more lines
21, corretto, windows, Pacific/Chatham, de_DE, stress JIT: task ':src:core:autostyleKotlinCheck'#L1
Execution failed for task ':src:core:autostyleKotlinCheck': See 'What went wrong' below
21, corretto, windows, Pacific/Chatham, de_DE, stress JIT
Execution failed for task ':src:core:autostyleKotlinCheck'. > The following files have format violations: src\test\kotlin\org\apache\jmeter\threads\ThreadGroupTest.kt @@ -1,59 +1,61 @@ -/*\r\n - * Licensed to the Apache Software Foundation (ASF) under one or more\r\n - * contributor license agreements. See the NOTICE file distributed with\r\n - * this work for additional information regarding copyright ownership.\r\n - * The ASF licenses this file to you under the Apache License, Version 2.0\r\n - * (the "License"); you may not use this file except in compliance with\r\n - * the License. You may obtain a copy of the License at\r\n - *\r\n - * http://www.apache.org/licenses/LICENSE-2.0\r\n - *\r\n - * Unless required by applicable law or agreed to in writing, software\r\n - * distributed under the License is distributed on an "AS IS" BASIS,\r\n - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n - * See the License for the specific language governing permissions and\r\n - * limitations under the License.\r\n - */\r\n -\r\n -package org.apache.jmeter.threads\r\n -\r\n -import org.apache.jmeter.control.LoopController\r\n -import org.apache.jmeter.junit.JMeterTestCase\r\n -import org.apache.jmeter.test.assertions.executePlanAndCollectEvents\r\n -import org.apache.jmeter.test.samplers.ThreadSleep\r\n -import org.apache.jmeter.treebuilder.TreeBuilder\r\n -import org.junit.jupiter.api.Assertions.assertEquals\r\n -import org.junit.jupiter.api.Test\r\n -import kotlin.time.Duration.Companion.seconds\r\n -\r\n -class ThreadGroupTest : JMeterTestCase() {\r\n - @test\r\n - fun `threadNum with trailing whitespace`() {\r\n - val events = executePlanAndCollectEvents(10.seconds, fun TreeBuilder.() {\r\n - ThreadGroup::class {\r\n - props {\r\n - it[numThreads] = "1 "\r\n - }\r\n - rampUp = 0\r\n - scheduler = true\r\n - delay = 0\r\n - duration = 1\r\n - setSamplerController(\r\n - LoopController().apply {\r\n - loops = 1\r\n - setContinueForever(false)\r\n - }\r\n - )\r\n -\r\n - ThreadSleep::class {\r\n ... (72 more lines that didn't fit) You might want to adjust -PmaxCheckMessageLines=50 -PmaxFilesToList=10 -PminLinesPerFile=4 to see more violations Run './gradlew autostyleApply' to fix the violations.
17, zulu, macos, Pacific/Chatham, fr_FR, stress JIT: src/core/src/test/kotlin/org/apache/jmeter/threads/ThreadGroupTest.kt#L32
Replace 6 lines 32..44 with val events = executePlanAndCollectEvents( 10.seconds, fun TreeBuilder.() { ThreadGroup::class { props { it[numThreads] = "1 "
17, zulu, macos, Pacific/Chatham, fr_FR, stress JIT: src/core/src/test/kotlin/org/apache/jmeter/threads/ThreadGroupTest.kt#L46
Replace 10 lines 46..46 with rampUp = 0 scheduler = true delay = 0 duration = 1 setSamplerController( LoopController().apply { loops = 1 setContinueForever(false) } )
17, zulu, macos, Pacific/Chatham, fr_FR, stress JIT: src/core/src/test/kotlin/org/apache/jmeter/threads/ThreadGroupTest.kt#L48
Replace 3 lines 48..49 with ThreadSleep::class { duration = 0.seconds }
17, zulu, macos, Pacific/Chatham, fr_FR, stress JIT: task ':src:core:autostyleKotlinCheck'#L1
Execution failed for task ':src:core:autostyleKotlinCheck': See 'What went wrong' below
17, zulu, macos, Pacific/Chatham, fr_FR, stress JIT
Execution failed for task ':src:core:autostyleKotlinCheck'. > The following files have format violations: src/test/kotlin/org/apache/jmeter/threads/ThreadGroupTest.kt @@ -29,31 +29,33 @@ class ThreadGroupTest : JMeterTestCase() { @test fun `threadNum with trailing whitespace`() { -········val·events·=·executePlanAndCollectEvents(10.seconds,·fun·TreeBuilder.()·{␊ -············ThreadGroup::class·{␊ -················props·{␊ -····················it[numThreads]·=·"1·"␊ -················}␊ -················rampUp·=·0␊ -················scheduler·=·true␊ -················delay·=·0␊ -················duration·=·1␊ -················setSamplerController(␊ -····················LoopController().apply·{␊ -························loops·=·1␊ -························setContinueForever(false)␊ +········val·events·=·executePlanAndCollectEvents(␊ +············10.seconds,␊ +············fun·TreeBuilder.()·{␊ +················ThreadGroup::class·{␊ +····················props·{␊ +························it[numThreads]·=·"1·"␊ } -················)␊ +····················rampUp·=·0␊ +····················scheduler·=·true␊ +····················delay·=·0␊ +····················duration·=·1␊ +····················setSamplerController(␊ +························LoopController().apply·{␊ +····························loops·=·1␊ +····························setContinueForever(false)␊ +························}␊ +····················)␊ -················ThreadSleep::class·{␊ -····················duration·=·0.seconds␊ +····················ThreadSleep::class·{␊ +························duration·=·0.seconds␊ +····················}␊ } } -········})␊ +········)␊ assertEquals(1, events.size) { "ThreadGroup.threadNum has trailing whitespace, it should be trimmed, so one event should be generated. " + "Actual events are $events" } ... (3 more lines that didn't fit) You might want to adjust -PmaxCheckMessageLines=50 -PmaxFilesToList=10 -PminLinesPerFile=4 to see more violations Run './gradlew autostyleApply' to fix the violations.
17, oracle, same hashcode, windows, Pacific/Chatham, de_DE, stress JIT
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-java@v3, burrunan/gradle-cache-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
21, liberica, windows, America/New_York, tr_TR
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: burrunan/gradle-cache-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
21, corretto, windows, Pacific/Chatham, de_DE, stress JIT
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: burrunan/gradle-cache-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Error Prone (JDK 17)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: burrunan/gradle-cache-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
17, zulu, macos, Pacific/Chatham, fr_FR, stress JIT
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: burrunan/gradle-cache-action@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.