50
50
import com .qfs .store .NoTransactionException ;
51
51
import com .qfs .store .TypeValues ;
52
52
import com .qfs .store .build .impl .UnitTestDatastoreBuilder ;
53
- import com .qfs .store .impl .Datastore ;
54
53
import com .qfs .store .query .ICursor ;
55
54
import com .qfs .store .record .IRecordReader ;
56
55
import com .qfs .store .transaction .DatastoreTransactionException ;
@@ -111,13 +110,13 @@ public static void performGC() {
111
110
112
111
/*
113
112
* Note. We can't rely on calling MemUtils.runGC() because on some servers (alto), it seems not enough.
114
- * Plus, MemUtils relies on on heap memory....
113
+ * Plus, MemUtils relies on on- heap memory....
115
114
*/
116
115
for (int i = 0 ; i < MAX_GC_STEPS ; i ++) {
117
116
try {
118
117
System .gc ();
119
118
120
- Thread .sleep (1 << i ); // give gc some times .
119
+ Thread .sleep (1 << i ); // give gc some time .
121
120
122
121
// create a soft assertion that allows getting the assertions results of all assertions
123
122
// even if the first assertion is already false.
@@ -134,7 +133,7 @@ public static void performGC() {
134
133
}
135
134
136
135
void createApplication (
137
- final ThrowingLambda .ThrowingBiConsumer <Datastore , IActivePivotManager > actions ) {
136
+ final ThrowingLambda .ThrowingBiConsumer <IDatastore , IActivePivotManager > actions ) {
138
137
final IDatastoreSchemaDescription datastoreSchema =
139
138
StartBuilding .datastoreSchema ()
140
139
.withStore (
@@ -321,7 +320,7 @@ void createApplication(
321
320
.end ()
322
321
.build ())
323
322
.build ();
324
- final ApplicationInTests <Datastore > application =
323
+ final ApplicationInTests <IDatastore > application =
325
324
ApplicationInTests .builder ()
326
325
.withDatastore (datastoreSchema )
327
326
.withManager (userManagerDescription )
@@ -332,7 +331,7 @@ void createApplication(
332
331
}
333
332
334
333
void createMinimalApplication (
335
- final ThrowingLambda .ThrowingBiConsumer <Datastore , IActivePivotManager > actions ) {
334
+ final ThrowingLambda .ThrowingBiConsumer <IDatastore , IActivePivotManager > actions ) {
336
335
337
336
final IDatastoreSchemaDescription datastoreSchema =
338
337
StartBuilding .datastoreSchema ()
@@ -382,7 +381,7 @@ void createMinimalApplication(
382
381
.build ())
383
382
.build ();
384
383
385
- final ApplicationInTests <Datastore > application =
384
+ final ApplicationInTests <IDatastore > application =
386
385
ApplicationInTests .builder ()
387
386
.withDatastore (datastoreSchema )
388
387
.withManager (userManagerDescription )
@@ -397,7 +396,7 @@ void createMinimalApplication(
397
396
*
398
397
* @param datastore datastore to fill
399
398
*/
400
- static void fillApplicationMinimal (final Datastore datastore ) {
399
+ static void fillApplicationMinimal (final IDatastore datastore ) {
401
400
AtomicInteger operationsBatch = new AtomicInteger ();
402
401
datastore .edit (
403
402
tm -> {
@@ -429,7 +428,7 @@ static void fillApplicationMinimal(final Datastore datastore) {
429
428
*
430
429
* @param datastore datastore to fill
431
430
*/
432
- static void fillApplication (final Datastore datastore ) {
431
+ static void fillApplication (final IDatastore datastore ) {
433
432
datastore .edit (
434
433
tm -> {
435
434
final int peopleCount = STORE_PEOPLE_COUNT ;
@@ -470,7 +469,7 @@ static void fillApplication(final Datastore datastore) {
470
469
*
471
470
* @param datastore datastore to fill
472
471
*/
473
- static void fillApplicationMinimalWithSingleValue (final Datastore datastore ) {
472
+ static void fillApplicationMinimalWithSingleValue (final IDatastore datastore ) {
474
473
AtomicInteger operationsBatch = new AtomicInteger ();
475
474
476
475
datastore .edit (
@@ -502,7 +501,7 @@ static void fillApplicationMinimalWithSingleValue(final Datastore datastore) {
502
501
*
503
502
* @param datastore datastore to fill
504
503
*/
505
- static void editApplicationMinimalWithSingleValue (final Datastore datastore ) {
504
+ static void editApplicationMinimalWithSingleValue (final IDatastore datastore ) {
506
505
datastore .edit (
507
506
tm -> {
508
507
final int peopleCount = STORE_PEOPLE_COUNT ;
@@ -534,7 +533,7 @@ static void editApplicationMinimalWithSingleValue(final Datastore datastore) {
534
533
* @param datastore datastore to fill
535
534
*/
536
535
static void fillApplicationWithBranches (
537
- final Datastore datastore , Collection <String > branches , boolean minimalFilling )
536
+ final IDatastore datastore , Collection <String > branches , boolean minimalFilling )
538
537
throws IllegalArgumentException {
539
538
if (minimalFilling ) {
540
539
fillApplicationMinimal (datastore );
@@ -940,7 +939,11 @@ ApplicationInTests<IDatastore> createDistributedApplicationWithKeepAllEpochPolic
940
939
StartBuilding .cube ("QueryCubeA" )
941
940
.withContributorsCount ()
942
941
.withCalculations (
943
- context -> Copper .count ().multiply (Copper .constant (2L )).publish (context ))
942
+ context ->
943
+ Copper .count ()
944
+ .multiply (Copper .constant (2L ))
945
+ .as ("Contributors count times 2" )
946
+ .publish (context ))
944
947
.asQueryCube ()
945
948
.withClusterDefinition ()
946
949
.withClusterId (clusterName )
0 commit comments