@@ -458,7 +458,6 @@ instance ApproxEq UpdatableIndexSetting where
458 a =~ b = a == b
458 a =~ b = a == b
462noDuplicates :: Eq a => [a] -> Bool
461noDuplicates :: Eq a => [a] -> Bool
463noDuplicates xs = nub xs == xs
462noDuplicates xs = nub xs == xs
@@ -493,6 +492,7 @@ instance Arbitrary a => Arbitrary (Hit a) where
493 <*> arbitraryScore
492 <*> arbitraryScore
494 <*> arbitrary
493 <*> arbitrary
495 <*> arbitrary
494 <*> arbitrary
495+ shrink = genericShrink
498instance Arbitrary a => Arbitrary (SearchHits a) where
498instance Arbitrary a => Arbitrary (SearchHits a) where
@@ -501,6 +501,7 @@ instance Arbitrary a => Arbitrary (SearchHits a) where
501 score <- arbitraryScore
501 score <- arbitraryScore
502 hs <- arbitrary
502 hs <- arbitrary
503 return $ SearchHits tot score hs
503 return $ SearchHits tot score hs
504+ shrink = genericShrink
505reduceSize :: Gen a -> Gen a
506reduceSize :: Gen a -> Gen a
506reduceSize f = sized $ \n -> resize (n `div` 2) f
507reduceSize f = sized $ \n -> resize (n `div` 2) f
@@ -538,9 +539,13 @@ instance Arbitrary AliasRouting where
538 <$> (Just <$> arbitrary)
539 <$> (Just <$> arbitrary)
539 <*> (Just <$> arbitrary)
540 <*> (Just <$> arbitrary)
540 allAlias = AllAliasRouting <$> arbitrary
541 allAlias = AllAliasRouting <$> arbitrary
542+ shrink = genericShrink
542instance Arbitrary FieldName where
545instance Arbitrary FieldName where
543 arbitrary = FieldName . T.pack <$> listOf1 arbitraryAlphaNum
546 arbitrary = FieldName . T.pack <$> listOf1 arbitraryAlphaNum
547+ shrink = genericShrink
545instance Arbitrary RegexpFlags where
550instance Arbitrary RegexpFlags where
546 arbitrary = oneof [ pure AllRegexpFlags
551 arbitrary = oneof [ pure AllRegexpFlags
@@ -548,9 +553,12 @@ instance Arbitrary RegexpFlags where
548 , SomeRegexpFlags <$> genUniqueFlags
553 , SomeRegexpFlags <$> genUniqueFlags
550 where genUniqueFlags = NE.fromList . nub <$> listOf1 arbitrary
555 where genUniqueFlags = NE.fromList . nub <$> listOf1 arbitrary
556+ shrink = genericShrink
552instance Arbitrary IndexAliasCreate where
559instance Arbitrary IndexAliasCreate where
553 arbitrary = IndexAliasCreate <$> arbitrary <*> reduceSize arbitrary
560 arbitrary = IndexAliasCreate <$> arbitrary <*> reduceSize arbitrary
561+ shrink = genericShrink
555instance Arbitrary Query where
563instance Arbitrary Query where
556 arbitrary = reduceSize $ oneof [ TermQuery <$> arbitrary <*> arbitrary
564 arbitrary = reduceSize $ oneof [ TermQuery <$> arbitrary <*> arbitrary
@@ -581,6 +589,7 @@ instance Arbitrary Query where
581 , QueryRangeQuery <$> arbitrary
589 , QueryRangeQuery <$> arbitrary
582 , QueryRegexpQuery <$> arbitrary
590 , QueryRegexpQuery <$> arbitrary
592+ shrink = genericShrink
585instance Arbitrary Filter where
594instance Arbitrary Filter where
586 arbitrary = reduceSize $ oneof [ AndFilter <$> arbitrary <*> arbitrary
595 arbitrary = reduceSize $ oneof [ AndFilter <$> arbitrary <*> arbitrary
@@ -601,6 +610,7 @@ instance Arbitrary Filter where
601 , RangeFilter <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
610 , RangeFilter <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
602 , RegexpFilter <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
611 , RegexpFilter <$> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary <*> arbitrary
603 , TermFilter <$> arbitrary <*> arbitrary]
612 , TermFilter <$> arbitrary <*> arbitrary]
613+ shrink = genericShrink
605instance Arbitrary ReplicaBounds where
615instance Arbitrary ReplicaBounds where
606 arbitrary = oneof [ replicasBounded
616 arbitrary = oneof [ replicasBounded