internal DistributedCacheServiceArguments CreateDistributedCacheServiceArguments( IAbsolutePathFileCopier copier, IAbsolutePathTransformer pathTransformer, DistributedContentSettings dcs, HostInfo host, string cacheName, string cacheRootPath, uint grpcPort, int maxSizeQuotaMB, string dataRootPath, CancellationToken ct, int?bufferSizeForGrpcCopies = null, int?gzipBarrierSizeForGrpcCopies = null) { var distributedCacheServiceHost = new EnvironmentVariableHost(); var localCasSettings = LocalCasSettings.Default( maxSizeQuotaMB: maxSizeQuotaMB, cacheRootPath: cacheRootPath, cacheName: cacheName, grpcPort: grpcPort, grpcPortFileName: _scenario); localCasSettings.PreferredCacheDrive = Path.GetPathRoot(cacheRootPath); localCasSettings.ServiceSettings = new LocalCasServiceSettings(60, scenarioName: _scenario, grpcPort: grpcPort, grpcPortFileName: _scenario, bufferSizeForGrpcCopies: bufferSizeForGrpcCopies, gzipBarrierSizeForGrpcCopies: gzipBarrierSizeForGrpcCopies); var config = new DistributedCacheServiceConfiguration(localCasSettings, dcs); return(new DistributedCacheServiceArguments(_logger, copier, pathTransformer, distributedCacheServiceHost, host, ct, dataRootPath, config, null)); }
protected abstract (IContentStore store, IStartupShutdown server) CreateStore( Context context, IAbsolutePathFileCopier fileCopier, DisposableDirectory testDirectory, int index, int iteration, uint grpcPort);
internal DistributedCacheServiceArguments CreateDistributedCacheServiceArguments( IAbsolutePathFileCopier copier, IAbsolutePathTransformer pathTransformer, HostInfo host, string cacheName, string cacheRootPath, uint grpcPort, int maxSizeQuotaMB, string dataRootPath, CancellationToken ct, int?bufferSizeForGrpcCopies = null) { var distributedCacheServiceHost = new TestHost(); var localCasSettings = LocalCasSettings.Default( maxSizeQuotaMB: maxSizeQuotaMB, cacheRootPath: cacheRootPath, cacheName: cacheName, grpcPort: grpcPort, grpcPortFileName: _scenario); localCasSettings.PreferredCacheDrive = Path.GetPathRoot(cacheRootPath); localCasSettings.ServiceSettings = new LocalCasServiceSettings(60, scenarioName: _scenario, grpcPort: grpcPort, grpcPortFileName: _scenario, bufferSizeForGrpcCopies: bufferSizeForGrpcCopies); var redisConnectionString = Environment.GetEnvironmentVariable(EnvironmentConnectionStringProvider.RedisConnectionStringEnvironmentVariable); var distributedContentSettings = DistributedContentSettings.CreateEnabled(new Dictionary <string, string>() { { host.StampId, redisConnectionString } }); var config = new DistributedCacheServiceConfiguration(localCasSettings, distributedContentSettings); return(new DistributedCacheServiceArguments(_logger, copier, pathTransformer, distributedCacheServiceHost, host, ct, dataRootPath, config, null)); }
/// <inheritdoc /> public DistributedCacheServiceArguments( ILogger logger, IAbsolutePathFileCopier copier, IAbsolutePathTransformer pathTransformer, IDistributedCacheServiceHost host, HostInfo hostInfo, CancellationToken cancellation, string dataRootPath, DistributedCacheServiceConfiguration configuration, string keyspace) { Logger = logger; Copier = copier; PathTransformer = pathTransformer; Host = host; HostInfo = hostInfo; Cancellation = cancellation; DataRootPath = dataRootPath; Configuration = configuration; Keyspace = ComputeKeySpace(hostInfo, configuration, keyspace); }
public TestContext(Context context, IAbsolutePathFileCopier fileCopier, IList <DisposableDirectory> directories, IList <(IContentStore store, IStartupShutdown server)> stores, int iteration)
/// <nodoc /> public BandwidthCheckedCopier(IAbsolutePathFileCopier inner, BandwidthChecker.Configuration config, ILogger logger) { _inner = inner; _checker = new BandwidthChecker(config); _logger = logger; }