Open jiasli opened 6 months ago
Thank you for opening this issue, we will look into it.
This issue now even happens on dev
branch: https://dev.azure.com/azclitools/public/_build/results?buildId=153053&view=logs&j=f127618a-a658-5219-f5b0-4a245c9227b8&t=60a7c4e7-f35f-5fef-6efb-f1b54b8cb075&l=7690
Interesting thing is that it only happens on instance 3 and certain tests:
2024-04-28T09:15:38.3043953Z =========================== short test summary info ============================
2024-04-28T09:15:38.3044484Z FAILED src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/test_containerapp_commands.py::ContainerappIngressTests::test_containerapp_custom_domains_app_in_different_rg
2024-04-28T09:15:38.3045095Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_application
2024-04-28T09:15:38.3045639Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_autoscale_operation
2024-04-28T09:15:38.3046171Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_azure_monitor
2024-04-28T09:15:38.3046701Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_kafka
2024-04-28T09:15:38.3047276Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_kafka_with_optional_disk_args
2024-04-28T09:15:38.3047865Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_kafka_with_rest_proxy
2024-04-28T09:15:38.3048502Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_min_args
2024-04-28T09:15:38.3049035Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_resize
2024-04-28T09:15:38.3049595Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_availability_zones
2024-04-28T09:15:38.3050154Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_cluster_config
2024-04-28T09:15:38.3050726Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_component_version
2024-04-28T09:15:38.3051280Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_compute_isolation
2024-04-28T09:15:38.3051852Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_encryption_at_host
2024-04-28T09:15:38.3052416Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_encryption_in_transit
2024-04-28T09:15:38.3052991Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_loadbased_autoscale
2024-04-28T09:15:38.3053659Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_minimal_tls_version
2024-04-28T09:15:38.3054250Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_private_link_configurations
2024-04-28T09:15:38.3054821Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_schedulebased_autoscale
2024-04-28T09:15:38.3055373Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_cluster_with_ssh_creds
2024-04-28T09:15:38.3055902Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_monitor
2024-04-28T09:15:38.3056420Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_script_action
2024-04-28T09:15:38.3056948Z FAILED src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_usage
2024-04-28T09:15:38.3057438Z FAILED src/azure-cli/azure/cli/command_modules/apim/tests/latest/test_apim_scenario.py::ApimScenarioTest::test_apim_core_service
2024-04-28T09:15:38.3057896Z FAILED src/azure-cli/azure/cli/command_modules/apim/tests/latest/test_apim_scenario.py::ApimScenarioTest::test_apim_deletedservice
2024-04-28T09:15:38.3058356Z FAILED src/azure-cli/azure/cli/command_modules/apim/tests/latest/test_apim_scenario.py::ApimScenarioTest::test_apim_export_api
2024-04-28T09:15:38.3058915Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_account_properties.py::CognitiveServicesPropertiesTests::test_cognitiveservices_account_capabilities
2024-04-28T09:15:38.3059558Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_account_properties.py::CognitiveServicesPropertiesTests::test_cognitiveservices_account_public_network_access
2024-04-28T09:15:38.3060189Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_api_properties.py::CognitiveServicesApiPropertiesTests::test_cognitiveservices_create_api_properties
2024-04-28T09:15:38.3060827Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_byox.py::CognitiveServicesByoxTests::test_cognitiveservices_encryption
2024-04-28T09:15:38.3061369Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_byox.py::CognitiveServicesByoxTests::test_cognitiveservices_user_owned_storage
2024-04-28T09:15:38.3061937Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_cognitiveservices_command.py::CognitiveServicesTests::test_cognitiveservices_account_list_kinds
2024-04-28T09:15:38.3062543Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_cognitiveservices_command.py::CognitiveServicesTests::test_cognitiveservices_account_list_skus
2024-04-28T09:15:38.3063148Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_cognitiveservices_command.py::CognitiveServicesTests::test_cognitiveservices_account_list_skus_legacy
2024-04-28T09:15:38.3063759Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_cognitiveservices_command.py::CognitiveServicesTests::test_cognitiveservices_account_list_usage
2024-04-28T09:15:38.3064454Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_cognitiveservices_command.py::CognitiveServicesTests::test_cognitiveservices_crud
2024-04-28T09:15:38.3065023Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_cognitiveservices_softdelete.py::CognitiveServicesTests::test_cognitiveservices_softdelete
2024-04-28T09:15:38.3065723Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_commitment_plan.py::CognitiveServicesCommitmentPlanTests::test_cognitiveservices_commitment_plan
2024-04-28T09:15:38.3066301Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_custom_domain.py::CognitiveServicesCustomDomainTests::test_cognitiveservices_custom_domain
2024-04-28T09:15:38.3066888Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_deployment.py::CognitiveServicesDeploymentTests::test_cognitiveservices_deployment
2024-04-28T09:15:38.3067451Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_identity.py::CognitiveServicesByoxTests::test_cognitiveservices_identity
2024-04-28T09:15:38.3068057Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_identity.py::CognitiveServicesByoxTests::test_cognitiveservices_identity_assign_when_create
2024-04-28T09:15:38.3068629Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_model.py::CognitiveServicesModelTests::test_cognitiveservices_model
2024-04-28T09:15:38.3069266Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_network_rules.py::CognitiveServicesNetworkRulesTests::test_cognitiveservices_network_rules
2024-04-28T09:15:38.3069863Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_private_endpoint.py::CognitiveServicesPrivateEndpointTests::test_cognitiveservices_private_endpoint
2024-04-28T09:15:38.3070474Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_private_endpoint.py::CognitiveServicesPrivateEndpointTests::test_cognitiveservices_private_endpoint_connection
2024-04-28T09:15:38.3071059Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_subscription_level_apis.py::CognitiveServicesTests::test_cognitiveservices_list_models
2024-04-28T09:15:38.3071634Z FAILED src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_subscription_level_apis.py::CognitiveServicesTests::test_cognitiveservices_list_usages
2024-04-28T09:15:38.3072167Z FAILED src/azure-cli/azure/cli/command_modules/dms/tests/latest/test_service_scenarios.py::DmsServiceTests::test_project_commands
2024-04-28T09:15:38.3072725Z FAILED src/azure-cli/azure/cli/command_modules/dms/tests/latest/test_service_scenarios.py::DmsServiceTests::test_service_commands
2024-04-28T09:15:38.3073198Z FAILED src/azure-cli/azure/cli/command_modules/dms/tests/latest/test_service_scenarios.py::DmsServiceTests::test_task_commands
2024-04-28T09:15:38.3073718Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_budget_create
2024-04-28T09:15:38.3074300Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_budget_delete
2024-04-28T09:15:38.3074863Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_budget_show
2024-04-28T09:15:38.3075446Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_budget_usage_create
2024-04-28T09:15:38.3076034Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_marketplace_list
2024-04-28T09:15:38.3076624Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_marketplace_list_billing_period
2024-04-28T09:15:38.3077246Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_marketplace_list_billing_period_filter
2024-04-28T09:15:38.3077899Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_pricesheet
2024-04-28T09:15:38.3078490Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_pricesheet_billing_period
2024-04-28T09:15:38.3079080Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_usage_by_billing_period
2024-04-28T09:15:38.3079680Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_usage_by_billing_period_expand
2024-04-28T09:15:38.3080243Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_usage_list
2024-04-28T09:15:38.3080829Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_usage_list_expand
2024-04-28T09:15:38.3081421Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_consumption_usage_list_properties
2024-04-28T09:15:38.3081984Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_list_reservations_details
2024-04-28T09:15:38.3082588Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_list_reservations_details_with_reservationid
2024-04-28T09:15:38.3083180Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_list_reservations_summaries_daily
2024-04-28T09:15:38.3083801Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_list_reservations_summaries_daily_with_reservationid
2024-04-28T09:15:38.3084471Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_list_reservations_summaries_monthly
2024-04-28T09:15:38.3085106Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_list_reservations_summaries_monthly_with_reservationid
2024-04-28T09:15:38.3085706Z FAILED src/azure-cli/azure/cli/command_modules/consumption/tests/latest/test_consumption_commands.py::AzureConsumptionServiceScenarioTest::test_list_usages_subscription_custom_date_range
2024-04-28T09:15:38.3086217Z FAILED src/azure-cli/azure/cli/command_modules/maps/tests/latest/test_maps_commands.py::MapsScenarioTests::test_create_maps_account
2024-04-28T09:15:38.3086660Z FAILED src/azure-cli/azure/cli/command_modules/maps/tests/latest/test_maps_creator.py::MapsCreatorTest::test_maps_creator
2024-04-28T09:15:38.3087091Z FAILED src/azure-cli/azure/cli/command_modules/maps/tests/latest/test_maps_creator.py::MapsCreatorTest::test_maps_map
2024-04-28T09:15:38.3087356Z ============ 75 failed, 92 passed, 23 skipped in 226.24s (0:03:46) =============
Possibly caused by https://github.com/Azure/azure-cli/pull/28673.
I am able to repro locally with
azdev test test_containerapp_manualjob_withsecret_crudoperations_e2e test_hdinsight_application -a -n 1
It seems test classes are collected by pytest
in the same process, so each cli_ctx
's config_dir
has the same value, such as /home/cloudtest/.azure/dummy_cli_config_dir/xGYaEIdmTuUx36nO
. --forked
only affects test methods.
However, this still can't answer why previous tests didn't fail, such as https://dev.azure.com/azclitools/public/_build/results?buildId=152726&view=logs&j=d3f69986-121a-5641-0308-9a539278aa7f&t=2538cf34-13d6-5659-841c-bf258a998985
This error doesn't happen without --fork
, explained as below:
azure.cli.core._session.Session
instances are singletons:
Without --fork
, different test methods share the same Session
objects, such as INDEX
, but with --forked
, each test method has its own forked Session
objects.
When running test_containerapp_manualjob_withsecret_crudoperations_e2e
and test_hdinsight_application
without --fork
, test_containerapp_manualjob_withsecret_crudoperations_e2e
initializes command index and saves it. As test_hdinsight_application
shares the same INDEX
, it reuses it and doesn't initialize command index again. But with --forked
, both tests see an empty INDEX
when test methods begin, and initialize it. Since the random config dir has been deleted by test_containerapp_manualjob_withsecret_crudoperations_e2e
, test_hdinsight_application
fails with a dir-not-exist error.
It seems that this is caused by the internal change in pytest
from 8.1.1 to 8.2.0.
https://github.com/Azure/azure-cli/pull/28807 succeeded but https://github.com/Azure/azure-cli/pull/28817 failed.
azdev test test_containerapp_manualjob_withsecret_crudoperations_e2e test_hdinsight_application --series -a -rP
also works in pytest 8.1.1.
I added some log in test initialization code. It seems that each test is initialized and executed in different thread, and the random config dir env is not polluted.
In 8.2.0, the __init__
method appears to execute in main thread, resulting in environment variable pollution across tests.
This is very interesting discovery.
By injecting
import os
print('__init__', os.getpid(), method_name)
at
we can see different versions of pytest show different output:
With pytest 8.1.1:
$ pip install pytest==8.1.1
$ python -m pytest -x -v --forked --log-level=WARN /home/user2/azure-cli/src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/test_containerappjob_with_secrets.py::ContainerAppJobsSecretsOperationsTest::test_containerapp_manualjob_withsecret_crudoperations_e2e /home/user2/azure-cli/src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_application -rP
============================================== test session starts ===============================================
platform linux -- Python 3.10.12, pytest-8.1.1, pluggy-1.5.0 -- /home/user2/py310/bin/python
cachedir: .pytest_cache
rootdir: /home/user2/azure-cli/src/azure-cli
plugins: xdist-3.5.0, forked-1.6.0
collected 2 items
src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/test_containerappjob_with_secrets.py::ContainerAppJobsSecretsOperationsTest::test_containerapp_manualjob_withsecret_crudoperations_e2e PASSED [ 50%]
src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_application PASSED [100%]
===================================================== PASSES =====================================================
________ ContainerAppJobsSecretsOperationsTest.test_containerapp_manualjob_withsecret_crudoperations_e2e _________
--------------------------------------------- Captured stdout setup ----------------------------------------------
__init__ 1971704 test_containerapp_manualjob_withsecret_crudoperations_e2e
---------------------------------------------- Captured stderr call ----------------------------------------------
----------------------------------------------- Captured log call ------------------------------------------------
WARNING cli.azure.cli.command_modules.containerapp.custom:custom.py:3233 Containerapp job 'job1000002' executions triggered now will have the added/updated secret.
WARNING cli.azure.cli.command_modules.containerapp.custom:custom.py:3233 Containerapp job 'job1000002' executions triggered now will have the added/updated secret.
WARNING cli.azure.cli.command_modules.containerapp.custom:custom.py:3194 Secret(s) successfully removed.
________________________________ HDInsightClusterTests.test_hdinsight_application ________________________________
--------------------------------------------- Captured stdout setup ----------------------------------------------
__init__ 1971712 test_hdinsight_application
----------------------------------------------- Captured log call ------------------------------------------------
WARNING msrest.serialization:serialization.py:187 Readonly attribute marketplace_identifier will be ignored in class <class 'azure.mgmt.hdinsight.models._models_py3.ApplicationProperties'>
=============================================== 2 passed in 2.88s ================================================
With pytest 8.2.0:
$ pip install pytest==8.2.0
$ python -m pytest -x -v --forked --log-level=WARN /home/user2/azure-cli/src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/test_containerappjob_with_secrets.py::ContainerAppJobsSecretsOperationsTest::test_containerapp_manualjob_withsecret_crudoperations_e2e /home/user2/azure-cli/src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_application -rP
============================================== test session starts ===============================================
platform linux -- Python 3.10.12, pytest-8.2.0, pluggy-1.5.0 -- /home/user2/py310/bin/python
cachedir: .pytest_cache
rootdir: /home/user2/azure-cli/src/azure-cli
plugins: xdist-3.5.0, forked-1.6.0
collecting ... __init__ 1971868 runTest
__init__ 1971868 test_containerapp_manualjob_withsecret_crudoperations_e2e
__init__ 1971868 runTest
__init__ 1971868 test_hdinsight_application
__init__ 1971868 test_hdinsight_autoscale_operation
__init__ 1971868 test_hdinsight_azure_monitor
__init__ 1971868 test_hdinsight_cluster_kafka
__init__ 1971868 test_hdinsight_cluster_kafka_with_optional_disk_args
__init__ 1971868 test_hdinsight_cluster_kafka_with_rest_proxy
__init__ 1971868 test_hdinsight_cluster_min_args
__init__ 1971868 test_hdinsight_cluster_resize
__init__ 1971868 test_hdinsight_cluster_with_availability_zones
__init__ 1971868 test_hdinsight_cluster_with_cluster_config
__init__ 1971868 test_hdinsight_cluster_with_component_version
__init__ 1971868 test_hdinsight_cluster_with_compute_isolation
__init__ 1971868 test_hdinsight_cluster_with_encryption_at_host
__init__ 1971868 test_hdinsight_cluster_with_encryption_in_transit
__init__ 1971868 test_hdinsight_cluster_with_loadbased_autoscale
__init__ 1971868 test_hdinsight_cluster_with_minimal_tls_version
__init__ 1971868 test_hdinsight_cluster_with_private_link_configurations
__init__ 1971868 test_hdinsight_cluster_with_schedulebased_autoscale
__init__ 1971868 test_hdinsight_cluster_with_ssh_creds
__init__ 1971868 test_hdinsight_monitor
__init__ 1971868 test_hdinsight_script_action
__init__ 1971868 test_hdinsight_usage
collected 2 items
src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/test_containerappjob_with_secrets.py::ContainerAppJobsSecretsOperationsTest::test_containerapp_manualjob_withsecret_crudoperations_e2e PASSED [ 50%]
src/azure-cli/azure/cli/command_modules/hdinsight/tests/latest/test_hdinsight_commands.py::HDInsightClusterTests::test_hdinsight_application PASSED [100%]
===================================================== PASSES =====================================================
________ ContainerAppJobsSecretsOperationsTest.test_containerapp_manualjob_withsecret_crudoperations_e2e _________
---------------------------------------------- Captured stderr call ----------------------------------------------
----------------------------------------------- Captured log call ------------------------------------------------
WARNING cli.azure.cli.command_modules.containerapp.custom:custom.py:3233 Containerapp job 'job1000002' executions triggered now will have the added/updated secret.
WARNING cli.azure.cli.command_modules.containerapp.custom:custom.py:3233 Containerapp job 'job1000002' executions triggered now will have the added/updated secret.
WARNING cli.azure.cli.command_modules.containerapp.custom:custom.py:3194 Secret(s) successfully removed.
________________________________ HDInsightClusterTests.test_hdinsight_application ________________________________
----------------------------------------------- Captured log call ------------------------------------------------
WARNING msrest.serialization:serialization.py:187 Readonly attribute marketplace_identifier will be ignored in class <class 'azure.mgmt.hdinsight.models._models_py3.ApplicationProperties'>
=============================================== 2 passed in 3.63s ================================================
We can see pytest 8.2.0:
unittest.case.TestCase.__init__
for runTest
and test methods that are not even invokedunittest.case.TestCase.__init__
during collecting phase in the same process, instead of forked processesI reported an issue to pytest: https://github.com/pytest-dev/pytest/issues/12289
https://dev.azure.com/azclitools/public/_build/results?buildId=153071&view=logs&j=f127618a-a658-5219-f5b0-4a245c9227b8&t=60a7c4e7-f35f-5fef-6efb-f1b54b8cb075&l=1659