title: Reactor GroupedFlux - wait to complete
body: <p>Having an async publisher like the one bellow, is there a way with Project Reactor to wait till the entire stream is finished processing?<br>
  Of course, without having to add a sleep for an unknown duration...</p>
  
  <pre><code>@Test
  public void groupByPublishOn() throws InterruptedException {
      UnicastProcessor&lt;Integer&gt; processor = UnicastProcessor.create();
  
      List&lt;Integer&gt; results = new ArrayList&lt;&gt;();
      Flux&lt;Flux&lt;Integer&gt;&gt; groupPublisher = processor.publish(1)
                                                    .autoConnect()
                                                    .groupBy(i -&gt; i % 2)
                                                    .map(group -&gt; group.publishOn(Schedulers.parallel()));
  
      groupPublisher.log()
                    .subscribe(g -&gt; g.log()
                                     .subscribe(results::add));
  
      List&lt;Integer&gt; input = Arrays.asList(1, 3, 5, 2, 4, 6, 11, 12, 13);
      input.forEach(processor::onNext);
      processor.onComplete();
  
      Thread.sleep(500);
  
      Assert.assertTrue(results.size() == input.size());
  }
  </code></pre>