File tree Expand file tree Collapse file tree 2 files changed +36
-2
lines changed 
LocalTesting/LocalTesting.IntegrationTests/StepDefinitions Expand file tree Collapse file tree 2 files changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ private async Task EnsureInfrastructureInitialized()
4848        _app  =  await  builder . BuildAsync ( ) ; 
4949        await  _app . StartAsync ( ) ; 
5050
51-         // Create HTTP client with service discovery 
52-         _httpClient  =  _app . CreateHttpClient ( "localtesting-webapi" ) ; 
51+         // Create HTTP client with service discovery - use the correct endpoint name "webapi"  
52+         _httpClient  =  _app . CreateHttpClient ( "localtesting-webapi" ,   "webapi" ) ; 
5353        _httpClient . Timeout  =  TimeSpan . FromMinutes ( 15 ) ;  // Extended timeout for 1M messages 
5454
5555        lock  ( _lockObject ) 
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ 
3+ #  Test script for observability tests fix - requires .NET 9.0 environment
4+ echo  " 🔧 Testing Observability Tests Fix" 
5+ echo  " 📋 Fixed: CreateHttpClient endpoint name issue" 
6+ echo  " " 
7+ 
8+ #  Check .NET version
9+ echo  " 1. Checking .NET version..." 
10+ dotnet --version
11+ 
12+ if  [ $?  -ne  0 ];  then 
13+     echo  " ❌ .NET 9.0 SDK not found. Please install .NET 9.0.100 or later." 
14+     echo  " 📥 Download from: https://dotnet.microsoft.com/download/dotnet/9.0" 
15+     exit  1
16+ fi 
17+ 
18+ echo  " " 
19+ echo  " 2. Building LocalTesting solution..." 
20+ dotnet build LocalTesting/LocalTesting.sln --configuration Release
21+ 
22+ if  [ $?  -ne  0 ];  then 
23+     echo  " ❌ Build failed. Cannot proceed with observability tests." 
24+     exit  1
25+ fi 
26+ 
27+ echo  " " 
28+ echo  " 3. Running observability tests..." 
29+ dotnet test  LocalTesting/LocalTesting.IntegrationTests --filter " Category=observability"   --configuration Release
30+ 
31+ echo  " " 
32+ echo  " ✅ Observability test execution completed" 
33+ echo  " 🔧 Fix applied: Corrected CreateHttpClient endpoint name from 'localtesting-webapi' to ('localtesting-webapi', 'webapi')" 
34+ echo  " 📝 The Aspire testing framework now properly resolves the HTTP endpoint" 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments