Skip to content

Commit

Permalink
[Azure Load Testing] Add NOT_VALIDATED to list of terminal states (Az…
Browse files Browse the repository at this point in the history
…ure#38701)

* Add not validated state to list of poller terminal states

* bug fix for VALIDATION_FAILURE

* unreleased version

* pr comments

* update asset tag

* update recordings

* update sanitization logic

* update sanitization

* update asset

* spelling check

* skip mypy

* update azure core min dep

* skipping failing test due to proxy

* add live_test_only

* test case failures fix

* fixx spacing

* update assets

* add cspell ignore for jmeter

* move cspell into dataplane

---------

Co-authored-by: Venkat Ragavan S <[email protected]>
venkatr21 and Venkat Ragavan S authored Jan 14, 2025
1 parent 2025f95 commit 3687a9f
Showing 10 changed files with 66 additions and 66 deletions.
4 changes: 4 additions & 0 deletions sdk/loadtesting/azure-developer-loadtesting/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -8,8 +8,12 @@

### Bugs Fixed

- Update API response enum typo for VALIDATION_FAILURE

### Other Changes

- Add NOT_VALIDATED to the list of terminal states for the file validation poller.

## 1.0.0 (2023-03-07)

### Breaking Changes
2 changes: 1 addition & 1 deletion sdk/loadtesting/azure-developer-loadtesting/assets.json
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/loadtesting/azure-developer-loadtesting",
"Tag": "python/loadtesting/azure-developer-loadtesting_76b2b80924"
"Tag": "python/loadtesting/azure-developer-loadtesting_1075f6ca83"
}
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ def __init__(self, interval=5) -> None:
self._initial_response = None
self._polling_interval = interval
self._status = None
self._termination_statuses = ["VALIDATION_SUCCESS", "VALIDATION_FAILED", "VALIDATION_NOT_REQUIRED"]
self._termination_statuses = ["VALIDATION_SUCCESS", "VALIDATION_FAILURE", "NOT_VALIDATED", "VALIDATION_NOT_REQUIRED"]

def _update_status(self) -> None:
self._status = self._resource["validationStatus"]
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ def __init__(self, interval=5) -> None:
self._initial_response = None
self._polling_interval = interval
self._status = None
self._termination_statuses = ["VALIDATION_SUCCESS", "VALIDATION_FAILED", "VALIDATION_NOT_REQUIRED"]
self._termination_statuses = ["VALIDATION_SUCCESS", "VALIDATION_FAILURE", "NOT_VALIDATED", "VALIDATION_NOT_REQUIRED"]

def _update_status(self) -> None:
self._status = self._resource["validationStatus"]
5 changes: 5 additions & 0 deletions sdk/loadtesting/azure-developer-loadtesting/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ignoreWords": [
"jmeter"
]
}
1 change: 1 addition & 0 deletions sdk/loadtesting/azure-developer-loadtesting/pyproject.toml
Original file line number Diff line number Diff line change
@@ -2,3 +2,4 @@
pylint = false
pyright = false
type_check_samples = false
mypy = false
2 changes: 1 addition & 1 deletion sdk/loadtesting/azure-developer-loadtesting/setup.py
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@
},
install_requires=[
"isodate<1.0.0,>=0.6.1",
"azure-core<2.0.0,>=1.24.0",
"azure-core<2.0.0,>=1.26.2",
"typing-extensions>=4.3.0; python_version<'3.8.0'",
],
python_requires=">=3.7",
51 changes: 23 additions & 28 deletions sdk/loadtesting/azure-developer-loadtesting/tests/sample.jmx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.3">
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
@@ -12,54 +12,49 @@
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<kg.apc.jmeter.threads.UltimateThreadGroup guiclass="kg.apc.jmeter.threads.UltimateThreadGroupGui" testclass="kg.apc.jmeter.threads.UltimateThreadGroup" testname="jp@gc - Ultimate Thread Group" enabled="true">
<kg.apc.jmeter.threads.UltimateThreadGroup guiclass="kg.apc.jmeter.threads.UltimateThreadGroupGui" testclass="kg.apc.jmeter.threads.UltimateThreadGroup" testname="jp@gc - Ultimate Thread Group">
<collectionProp name="ultimatethreadgroupdata">
<collectionProp name="-1108691518">
<stringProp name="1567">10</stringProp>
<collectionProp name="86135999">
<stringProp name="53">5</stringProp>
<stringProp name="48">0</stringProp>
<stringProp name="48873">180</stringProp>
<stringProp name="49710">240</stringProp>
<stringProp name="1567">10</stringProp>
<stringProp name="1567">10</stringProp>
<stringProp name="10">5</stringProp>
</collectionProp>
</collectionProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<intProp name="LoopController.loops">-1</intProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
</kg.apc.jmeter.threads.UltimateThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GET" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<intProp name="HTTPSampler.connect_timeout">60000</intProp>
<intProp name="HTTPSampler.response_timeout">60000</intProp>
<stringProp name="HTTPSampler.domain">app-service-sample-demo.azurewebsites.net</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path"></stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
<stringProp name="HTTPSampler.connect_timeout">60000</stringProp>
<stringProp name="HTTPSampler.response_timeout">60000</stringProp>
</HTTPSamplerProxy>
<hashTree/>
<kg.apc.jmeter.timers.VariableThroughputTimer guiclass="kg.apc.jmeter.timers.VariableThroughputTimerGui" testclass="kg.apc.jmeter.timers.VariableThroughputTimer" testname="jp@gc - Throughput Shaping Timer" enabled="true">
<kg.apc.jmeter.timers.VariableThroughputTimer guiclass="kg.apc.jmeter.timers.VariableThroughputTimerGui" testclass="kg.apc.jmeter.timers.VariableThroughputTimer" testname="jp@gc - Throughput Shaping Timer">
<collectionProp name="load_profile">
<collectionProp name="1543912173">
<collectionProp name="141330176">
<stringProp name="53">5</stringProp>
<stringProp name="53">5</stringProp>
<stringProp name="1567">10</stringProp>
<stringProp name="1691">50</stringProp>
<stringProp name="48873">180</stringProp>
</collectionProp>
<collectionProp name="1582355627">
<stringProp name="1691">50</stringProp>
<stringProp name="1691">50</stringProp>
<stringProp name="49710">240</stringProp>
<collectionProp name="141330176">
<stringProp name="53">5</stringProp>
<stringProp name="53">5</stringProp>
<stringProp name="1567">10</stringProp>
</collectionProp>
</collectionProp>
</kg.apc.jmeter.timers.VariableThroughputTimer>
59 changes: 27 additions & 32 deletions sdk/loadtesting/azure-developer-loadtesting/tests/second-sample.jmx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.4.3">
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.3">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
@@ -12,59 +12,54 @@
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<kg.apc.jmeter.threads.UltimateThreadGroup guiclass="kg.apc.jmeter.threads.UltimateThreadGroupGui" testclass="kg.apc.jmeter.threads.UltimateThreadGroup" testname="jp@gc - Ultimate Thread Group" enabled="true">
<kg.apc.jmeter.threads.UltimateThreadGroup guiclass="kg.apc.jmeter.threads.UltimateThreadGroupGui" testclass="kg.apc.jmeter.threads.UltimateThreadGroup" testname="jp@gc - Ultimate Thread Group">
<collectionProp name="ultimatethreadgroupdata">
<collectionProp name="-1108691518">
<stringProp name="1567">10</stringProp>
<collectionProp name="86135999">
<stringProp name="53">5</stringProp>
<stringProp name="48">0</stringProp>
<stringProp name="48873">180</stringProp>
<stringProp name="49710">240</stringProp>
<stringProp name="1567">10</stringProp>
<stringProp name="1567">10</stringProp>
<stringProp name="10">5</stringProp>
</collectionProp>
</collectionProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller">
<intProp name="LoopController.loops">-1</intProp>
<boolProp name="LoopController.continue_forever">false</boolProp>
</elementProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
</kg.apc.jmeter.threads.UltimateThreadGroup>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GET" enabled="true">
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="GET">
<intProp name="HTTPSampler.connect_timeout">60000</intProp>
<intProp name="HTTPSampler.response_timeout">60000</intProp>
<stringProp name="HTTPSampler.domain">app-service-sample-demo.azurewebsites.net</stringProp>
<stringProp name="HTTPSampler.port"></stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<stringProp name="HTTPSampler.path"></stringProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
<stringProp name="HTTPSampler.embedded_url_re"></stringProp>
<boolProp name="HTTPSampler.postBodyRaw">false</boolProp>
<elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="HTTPSampler.implementation">HttpClient4</stringProp>
<stringProp name="HTTPSampler.connect_timeout">60000</stringProp>
<stringProp name="HTTPSampler.response_timeout">60000</stringProp>
</HTTPSamplerProxy>
<hashTree/>
<kg.apc.jmeter.timers.VariableThroughputTimer guiclass="kg.apc.jmeter.timers.VariableThroughputTimerGui" testclass="kg.apc.jmeter.timers.VariableThroughputTimer" testname="jp@gc - Throughput Shaping Timer" enabled="true">
<kg.apc.jmeter.timers.VariableThroughputTimer guiclass="kg.apc.jmeter.timers.VariableThroughputTimerGui" testclass="kg.apc.jmeter.timers.VariableThroughputTimer" testname="jp@gc - Throughput Shaping Timer">
<collectionProp name="load_profile">
<collectionProp name="1543912173">
<collectionProp name="141330176">
<stringProp name="53">5</stringProp>
<stringProp name="53">5</stringProp>
<stringProp name="1567">10</stringProp>
<stringProp name="1691">50</stringProp>
<stringProp name="48873">180</stringProp>
</collectionProp>
<collectionProp name="1582355627">
<stringProp name="1691">50</stringProp>
<stringProp name="1691">50</stringProp>
<stringProp name="49710">240</stringProp>
<collectionProp name="141330176">
<stringProp name="53">5</stringProp>
<stringProp name="53">5</stringProp>
<stringProp name="1567">10</stringProp>
</collectionProp>
</collectionProp>
</kg.apc.jmeter.timers.VariableThroughputTimer>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
@@ -101,7 +96,7 @@
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
<ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table" enabled="true">
<ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="View Results in Table">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
@@ -138,7 +133,7 @@
<stringProp name="filename"></stringProp>
</ResultCollector>
<hashTree/>
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true">
<ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree">
<boolProp name="ResultCollector.error_logging">false</boolProp>
<objProp>
<name>saveConfig</name>
4 changes: 2 additions & 2 deletions sdk/loadtesting/azure-developer-loadtesting/tests/testcase.py
Original file line number Diff line number Diff line change
@@ -31,10 +31,10 @@ def create_run_client(self, endpoint):
LoadtestingPowerShellPreparer = functools.partial(
PowerShellPreparer,
"loadtesting",
loadtesting_endpoint="https://myservice.azure.com",
loadtesting_endpoint="service.eastus.cnt-prod.loadtesting.azure.com",
loadtesting_test_id="000",
loadtesting_file_id="000",
loadtesting_test_run_id="000",
loadtesting_test_run_id="000-run",
loadtesting_app_component="000",
loadtesting_subscription_id="000",
loadtesting_resource_id="000",

0 comments on commit 3687a9f

Please sign in to comment.