@@ -333,40 +333,11 @@ async def test_log_analytics_query_async(self):
333
333
def test_cloud_info (self ):
334
334
if ".dev." in self .engine_cs :
335
335
pytest .skip ("This test is not relevant for dev clusters" )
336
-
337
- # Clear the cache before testing
338
- with CloudSettings ._cloud_cache_lock :
339
- CloudSettings ._cloud_cache .clear ()
340
-
341
- # Get cloud info for the original URI
342
336
cloud_info = CloudSettings .get_cloud_info_for_cluster (self .engine_cs )
343
337
assert cloud_info is not CloudSettings .DEFAULT_CLOUD
344
338
assert cloud_info == CloudSettings .DEFAULT_CLOUD
345
-
346
- # Test same instance is returned for same authority
347
339
assert cloud_info is CloudSettings .get_cloud_info_for_cluster (self .engine_cs )
348
-
349
- # Test different paths with same authority use the same cache entry
350
- with_path = urljoin (self .engine_cs , "/test1/test2/test3" )
351
- assert cloud_info is CloudSettings .get_cloud_info_for_cluster (with_path )
352
-
353
- # Test another path variation
354
- with_db_path = urljoin (self .engine_cs , "/database" )
355
- assert cloud_info is CloudSettings .get_cloud_info_for_cluster (with_db_path )
356
-
357
- # Test that URLs with different ports are cached separately
358
- from urllib .parse import urlparse
359
-
360
- url_parts = urlparse (self .engine_cs )
361
-
362
- # Only run this test if the original URL doesn't already specify a port
363
- if not url_parts .port :
364
- # Create a URL with a different port
365
- with_port = f"{ url_parts .scheme } ://{ url_parts .netloc } :8080"
366
- port_cloud_info = CloudSettings .get_cloud_info_for_cluster (with_port )
367
-
368
- # Should be a different instance from the original
369
- assert port_cloud_info is not cloud_info
340
+ assert cloud_info == CloudSettings .get_cloud_info_for_cluster (urljoin (self .engine_cs , "/test1/test2/test3" ))
370
341
371
342
def test_cloud_info_404 (self ):
372
343
pytest .skip ("This test is currently wrong - until all cluster are updated to the redirect uri, this test will fail" )
0 commit comments