You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Dan Smith <ds...@pivotal.io> on 2016/01/26 21:47:09 UTC
Review Request 42822: GEODE-864: Waiting for conflation thread in
conflation tests
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42822/
-----------------------------------------------------------
Review request for geode, Barry Oglesby and xiaojian zhou.
Repository: geode
Description
-------
For parallel queues, there is a actually a separate conflation thread
that removes entries from the queue on conflation. The tests need to
wait for this thread to finish it's work.
As part of this change, I refactored the ParallelWANConflationDUnitTest
to remove a bunch of duplicate code, replaced the VM.invoke(String)
calls with lambdas, and scaled the test down to create fewer buckets and
do fewer puts so that it runs in 1/4 of the time.
Diffs
-----
gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java 230c8d8ce6f903cf5e4b9c8bf42b87ca04271647
gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java 4acaaf4c5f24123db335e39ea56592717c9ea17c
Diff: https://reviews.apache.org/r/42822/diff/
Testing
-------
Thanks,
Dan Smith
Re: Review Request 42822: GEODE-864: Waiting for conflation thread in
conflation tests
Posted by Dan Smith <ds...@pivotal.io>.
> On Jan. 26, 2016, 11:26 p.m., xiaojian zhou wrote:
> > gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java, line 2165
> > <https://reviews.apache.org/r/42822/diff/1/?file=1221832#file1221832line2165>
> >
> > There is a pauseSender() and pauseSenderAndWaitForDispatcherToPause(). You just made the 2 methods identical.
> >
> > Was that purposely using pauseSender() here?
> >
> > Others look good.
Could catch! Before my change, the test was calling pauseSender and then waiting for 3 seconds, so I think the intent was to wait for it to pause. I'll merge those duplicate methods.
- Dan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42822/#review116478
-----------------------------------------------------------
On Jan. 26, 2016, 8:47 p.m., Dan Smith wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42822/
> -----------------------------------------------------------
>
> (Updated Jan. 26, 2016, 8:47 p.m.)
>
>
> Review request for geode, Barry Oglesby and xiaojian zhou.
>
>
> Repository: geode
>
>
> Description
> -------
>
> For parallel queues, there is a actually a separate conflation thread
> that removes entries from the queue on conflation. The tests need to
> wait for this thread to finish it's work.
>
> As part of this change, I refactored the ParallelWANConflationDUnitTest
> to remove a bunch of duplicate code, replaced the VM.invoke(String)
> calls with lambdas, and scaled the test down to create fewer buckets and
> do fewer puts so that it runs in 1/4 of the time.
>
>
> Diffs
> -----
>
> gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java 230c8d8ce6f903cf5e4b9c8bf42b87ca04271647
> gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java 4acaaf4c5f24123db335e39ea56592717c9ea17c
>
> Diff: https://reviews.apache.org/r/42822/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dan Smith
>
>
Re: Review Request 42822: GEODE-864: Waiting for conflation thread in
conflation tests
Posted by xiaojian zhou <zh...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42822/#review116478
-----------------------------------------------------------
gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java (line 2165)
<https://reviews.apache.org/r/42822/#comment177495>
There is a pauseSender() and pauseSenderAndWaitForDispatcherToPause(). You just made the 2 methods identical.
Was that purposely using pauseSender() here?
Others look good.
- xiaojian zhou
On Jan. 26, 2016, 8:47 p.m., Dan Smith wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42822/
> -----------------------------------------------------------
>
> (Updated Jan. 26, 2016, 8:47 p.m.)
>
>
> Review request for geode, Barry Oglesby and xiaojian zhou.
>
>
> Repository: geode
>
>
> Description
> -------
>
> For parallel queues, there is a actually a separate conflation thread
> that removes entries from the queue on conflation. The tests need to
> wait for this thread to finish it's work.
>
> As part of this change, I refactored the ParallelWANConflationDUnitTest
> to remove a bunch of duplicate code, replaced the VM.invoke(String)
> calls with lambdas, and scaled the test down to create fewer buckets and
> do fewer puts so that it runs in 1/4 of the time.
>
>
> Diffs
> -----
>
> gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java 230c8d8ce6f903cf5e4b9c8bf42b87ca04271647
> gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java 4acaaf4c5f24123db335e39ea56592717c9ea17c
>
> Diff: https://reviews.apache.org/r/42822/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dan Smith
>
>
Re: Review Request 42822: GEODE-864: Waiting for conflation thread in
conflation tests
Posted by Dan Smith <ds...@pivotal.io>.
> On Jan. 26, 2016, 11:06 p.m., Barry Oglesby wrote:
> > I think you can remove the 'WANTestBase' from the lambda calls too since WANTestBase is a super class of the test class.
> >
> > from: vm4.invoke(WANTestBase.class, "enableConflation", new Object[] { "ln" });
> > to: vm4.invoke(() -> WANTestBase.enableConflation( "ln" ));
> > to: vm4.invoke(() -> enableConflation( "ln" ));
> >
> > I'm surprised you left the 'KBKBKB' log messages in there. :-)
Ok, I'll make those changes and push it. Thanks!
- Dan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42822/#review116471
-----------------------------------------------------------
On Jan. 26, 2016, 8:47 p.m., Dan Smith wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42822/
> -----------------------------------------------------------
>
> (Updated Jan. 26, 2016, 8:47 p.m.)
>
>
> Review request for geode, Barry Oglesby and xiaojian zhou.
>
>
> Repository: geode
>
>
> Description
> -------
>
> For parallel queues, there is a actually a separate conflation thread
> that removes entries from the queue on conflation. The tests need to
> wait for this thread to finish it's work.
>
> As part of this change, I refactored the ParallelWANConflationDUnitTest
> to remove a bunch of duplicate code, replaced the VM.invoke(String)
> calls with lambdas, and scaled the test down to create fewer buckets and
> do fewer puts so that it runs in 1/4 of the time.
>
>
> Diffs
> -----
>
> gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java 230c8d8ce6f903cf5e4b9c8bf42b87ca04271647
> gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java 4acaaf4c5f24123db335e39ea56592717c9ea17c
>
> Diff: https://reviews.apache.org/r/42822/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dan Smith
>
>
Re: Review Request 42822: GEODE-864: Waiting for conflation thread in
conflation tests
Posted by Barry Oglesby <bo...@pivotal.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42822/#review116471
-----------------------------------------------------------
Ship it!
I think you can remove the 'WANTestBase' from the lambda calls too since WANTestBase is a super class of the test class.
from: vm4.invoke(WANTestBase.class, "enableConflation", new Object[] { "ln" });
to: vm4.invoke(() -> WANTestBase.enableConflation( "ln" ));
to: vm4.invoke(() -> enableConflation( "ln" ));
I'm surprised you left the 'KBKBKB' log messages in there. :-)
- Barry Oglesby
On Jan. 26, 2016, 8:47 p.m., Dan Smith wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42822/
> -----------------------------------------------------------
>
> (Updated Jan. 26, 2016, 8:47 p.m.)
>
>
> Review request for geode, Barry Oglesby and xiaojian zhou.
>
>
> Repository: geode
>
>
> Description
> -------
>
> For parallel queues, there is a actually a separate conflation thread
> that removes entries from the queue on conflation. The tests need to
> wait for this thread to finish it's work.
>
> As part of this change, I refactored the ParallelWANConflationDUnitTest
> to remove a bunch of duplicate code, replaced the VM.invoke(String)
> calls with lambdas, and scaled the test down to create fewer buckets and
> do fewer puts so that it runs in 1/4 of the time.
>
>
> Diffs
> -----
>
> gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java 230c8d8ce6f903cf5e4b9c8bf42b87ca04271647
> gemfire-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelWANConflationDUnitTest.java 4acaaf4c5f24123db335e39ea56592717c9ea17c
>
> Diff: https://reviews.apache.org/r/42822/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Dan Smith
>
>