mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 21:10:49 +08:00 
			
		
		
		
	Fixed issue where qos was being created for each request so circuit breaker was never stopping traffic going to downstream service.
This commit is contained in:
		@@ -18,6 +18,26 @@ namespace Ocelot.UnitTests.DownstreamRouteFinder.UrlMatcher
 | 
			
		||||
            _urlMatcher = new RegExUrlMatcher();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [Fact]
 | 
			
		||||
        public void should_not_match_forward_slash_only_regex()
 | 
			
		||||
        {
 | 
			
		||||
            this.Given(x => x.GivenIHaveAUpstreamPath("/working/"))
 | 
			
		||||
              .And(x => x.GivenIHaveAnUpstreamUrlTemplatePattern("^/$"))
 | 
			
		||||
              .When(x => x.WhenIMatchThePaths())
 | 
			
		||||
              .And(x => x.ThenTheResultIsFalse())
 | 
			
		||||
              .BDDfy();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [Fact]
 | 
			
		||||
        public void should_match_forward_slash_only_regex()
 | 
			
		||||
        {
 | 
			
		||||
            this.Given(x => x.GivenIHaveAUpstreamPath("/"))
 | 
			
		||||
              .And(x => x.GivenIHaveAnUpstreamUrlTemplatePattern("^/$"))
 | 
			
		||||
              .When(x => x.WhenIMatchThePaths())
 | 
			
		||||
              .And(x => x.ThenTheResultIsTrue())
 | 
			
		||||
              .BDDfy();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [Fact]
 | 
			
		||||
        public void should_find_match_when_template_smaller_than_valid_path()
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user