@@ -120,10 +120,18 @@ await grouped.SelectMany(g => g)
120120 } ;
121121 }
122122
123- private IEnumerable < string > ParseExcludedClusters ( List < string > clusters , string clusterFilter )
123+ private IEnumerable < string > ParseExcludedClusters ( string clusterFilter )
124124 {
125125 if ( string . IsNullOrWhiteSpace ( clusterFilter ) ) return Enumerable . Empty < string > ( ) ;
126- clusters = clusters . Select ( c => c . ToLowerInvariant ( ) ) . ToList ( ) ;
126+ var clusters =
127+ #if DOTNETCORE
128+ typeof ( ClusterBase ) . Assembly ( )
129+ #else
130+ typeof ( ClusterBase ) . Assembly
131+ #endif
132+ . GetTypes ( )
133+ . Where ( t => typeof ( ClusterBase ) . IsAssignableFrom ( t ) && t != typeof ( ClusterBase ) )
134+ . Select ( c => c . Name . Replace ( "Cluster" , "" ) . ToLowerInvariant ( ) ) ;
127135 var filters = clusterFilter . Split ( ',' ) . Select ( c => c . Trim ( ) . ToLowerInvariant ( ) ) ;
128136 var include = filters . Where ( f => ! f . StartsWith ( "-" ) ) . Select ( f => f . ToLowerInvariant ( ) ) ;
129137 if ( include . Any ( ) ) return clusters . Where ( c => ! include . Contains ( c ) ) ;
@@ -139,8 +147,7 @@ private async Task<RunSummary> IntegrationPipeline(int defaultMaxConcurrency,
139147 Console . WriteLine ( "Starting integration tests" ) ;
140148 var summaries = new ConcurrentBag < RunSummary > ( ) ;
141149 var clusterTotals = new Dictionary < string , Stopwatch > ( ) ;
142- var clusters = grouped . Select ( g => g . Key . GetType ( ) . Name . Replace ( "Cluster" , "" ) ) . ToList ( ) ;
143- var excludedClusters = ParseExcludedClusters ( clusters , TestClient . Configuration . ClusterFilter ) ;
150+ var excludedClusters = ParseExcludedClusters ( TestClient . Configuration . ClusterFilter ) ;
144151 var testFilter = TestClient . Configuration . TestFilter ;
145152 foreach ( var group in grouped )
146153 {
0 commit comments