@Test
        @FeatureRequirementSet(FeatureRequirementSet.Package.SIMPLE)
        @FeatureRequirement(featureClass = Graph.Features.VertexPropertyFeatures.class, feature = Graph.Features.VertexPropertyFeatures.FEATURE_INTEGER_VALUES)
        public void shouldGenerateDifferentGraph() throws Exception {
            final Configuration configuration = graphProvider.newGraphConfiguration("g1", this.getClass(), name.getMethodName(), null);
            final Graph graph1 = graphProvider.openTestGraph(configuration);

            try {
                communityGeneratorTest(graph, () -> 123456789l);

                afterLoadGraphWith(graph1);
                communityGeneratorTest(graph1, () -> 987654321l);

                final GraphTraversalSource g = graph.traversal();
                final GraphTraversalSource g1 = graph1.traversal();

                assertTrue(g.E().count().next() > 0);
                assertTrue(g.V().count().next() > 0);
                assertTrue(g1.E().count().next() > 0);
                assertTrue(g1.V().count().next() > 0);

                // don't assert counts of edges...those may be the same, just ensure that not every vertex has the
                // same number of edges between graphs.  that should make it harder for the test to fail.
                assertFalse(same(graph, graph1));
            } catch (Exception ex) {
                throw ex;
            } finally {
                graphProvider.clear(graph1, configuration);
            }

            assertFalse(failures.get() >= ultimateFailureThreshold);
        }
Keep a failures count across all tests in the set and continually evaluate if those failures exceed
the threshold for "total" failure.  This approach helps soften the tests a bit to prevent failures
due to non-deterministic behavior in graph generation techniques.
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/algorithm/generator/CommunityGeneratorTest.java