|
|
|
|
@ -86,6 +86,12 @@ class AggregationOptionsTests {
@@ -86,6 +86,12 @@ class AggregationOptionsTests {
|
|
|
|
|
assertThat(aggregationOptions.isAllowDiskUseSet()).isFalse(); |
|
|
|
|
|
|
|
|
|
assertThat(aggregationOptions.toDocument()).doesNotContainKey("allowDiskUse"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test // GH-4664
|
|
|
|
|
void applyOptionsDoesNotChangeAllowDiskUseDefault() { |
|
|
|
|
|
|
|
|
|
aggregationOptions = AggregationOptions.fromDocument(new Document()); |
|
|
|
|
|
|
|
|
|
Document empty = new Document(); |
|
|
|
|
aggregationOptions.applyAndReturnPotentiallyChangedCommand(empty); |
|
|
|
|
@ -93,6 +99,17 @@ class AggregationOptionsTests {
@@ -93,6 +99,17 @@ class AggregationOptionsTests {
|
|
|
|
|
assertThat(empty).doesNotContainKey("allowDiskUse"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test // GH-4664
|
|
|
|
|
void applyOptionsDoesNotChangeExistingAllowDiskUse() { |
|
|
|
|
|
|
|
|
|
aggregationOptions = AggregationOptions.fromDocument(new Document()); |
|
|
|
|
|
|
|
|
|
Document existing = new Document("allowDiskUse", true); |
|
|
|
|
aggregationOptions.applyAndReturnPotentiallyChangedCommand(existing); |
|
|
|
|
|
|
|
|
|
assertThat(existing).containsEntry("allowDiskUse", true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test // DATAMONGO-960, DATAMONGO-2153, DATAMONGO-1836
|
|
|
|
|
void aggregationOptionsToString() { |
|
|
|
|
|
|
|
|
|
|