Skip to content

Commit

Permalink
Randomly add feature to test
Browse files Browse the repository at this point in the history
  • Loading branch information
jasontedor committed Jun 1, 2018
1 parent 26071ff commit 8be176c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ public void testVersion() {
final Version beforeVersion =
randomVersionBetween(random(), VersionUtils.getFirstVersion(), VersionUtils.getPreviousVersion(version));
out.setVersion(beforeVersion);
if (custom.getRequiredFeature().isPresent() && randomBoolean()) {
out.setFeatures(Collections.singleton(custom.getRequiredFeature().get()));
}
assertFalse(FeatureAware.shouldSerializeCustom(out, custom));
}
}
Expand Down

0 comments on commit 8be176c

Please sign in to comment.