@@ -34,7 +34,7 @@ protected ServiceClientContentStoreConfiguration CreateConfiguration()
34
34
35
35
protected const int ContentByteCount = 100 ;
36
36
protected const HashType ContentHashType = HashType . Vso0 ;
37
- private const long DefaultMaxSize = 1 * 1024 * 1024 ;
37
+ protected const long DefaultMaxSize = 1 * 1024 * 1024 ;
38
38
protected static readonly CancellationToken Token = CancellationToken . None ;
39
39
protected string Scenario ;
40
40
@@ -65,14 +65,14 @@ protected async Task RunSessionTestAsync(
65
65
}
66
66
}
67
67
68
- protected async Task RunStoreTestAsync ( Func < Context , IContentStore , Task > funcAsync , LocalServerConfiguration localContentServerConfiguration = null , TimeSpan ? heartbeatOverride = null )
68
+ protected async Task RunStoreTestAsync ( Func < Context , IContentStore , Task > funcAsync , LocalServerConfiguration localContentServerConfiguration = null , TimeSpan ? heartbeatOverride = null , long cacheSize = DefaultMaxSize )
69
69
{
70
70
var context = new Context ( Logger ) ;
71
71
// Using unique scenario to avoid flakiness when running the tests in parallel
72
72
Scenario += Guid . NewGuid ( ) ;
73
73
using ( var directory = new DisposableDirectory ( FileSystem ) )
74
74
{
75
- var config = new ContentStoreConfiguration ( new MaxSizeQuota ( $ "{ DefaultMaxSize } ") ) ;
75
+ var config = new ContentStoreConfiguration ( new MaxSizeQuota ( $ "{ cacheSize } ") ) ;
76
76
77
77
using ( var store = CreateStore ( directory . Path , config , localContentServerConfiguration ?? TestConfigurationHelper . LocalContentServerConfiguration , heartbeatOverride ) )
78
78
{
@@ -92,11 +92,13 @@ protected async Task RunStoreTestAsync(Func<Context, IContentStore, Task> funcAs
92
92
protected Task RunSessionTestAsync (
93
93
ImplicitPin implicitPin ,
94
94
Func < Context , IContentSession , Task > funcAsync ,
95
- LocalServerConfiguration localContentServerConfiguration = null )
95
+ LocalServerConfiguration localContentServerConfiguration = null ,
96
+ long cacheSize = DefaultMaxSize )
96
97
{
97
98
return RunStoreTestAsync (
98
99
( context , store ) => RunSessionTestAsync ( context , store , implicitPin , funcAsync ) ,
99
- localContentServerConfiguration ) ;
100
+ localContentServerConfiguration ,
101
+ cacheSize : cacheSize ) ;
100
102
}
101
103
102
104
protected abstract T CreateStore ( AbsolutePath rootPath , ContentStoreConfiguration configuration , LocalServerConfiguration localContentServerConfiguration , TimeSpan ? heartbeatOverride ) ;
0 commit comments