On Tue, Aug 18, 2015 at 12:24:30PM -0700, Curtis Gagliardi wrote:
> I meant to follow up earlier, but for the record I couldn't figure how
> to apply these changes to the tests.  From what I remember his speedups
> came from flushing and closing stdin, while we never even create a
> handle for stdin in withExecutable.   We also don't wait for all of
> stdout, we just kill the process as soon as we get what we want, so I
> don't think waitForProcess would help us.  I experimented with these
> things and couldn't get any speedup, but I don't understand the
> underlying problems that Gabriel fixed to say for sure I was doing
> solved the problems he had.

Well, I think your time spent was productive, so thanks! We might need
to approach this a different way.

Let me provide more details to (what I think is) the problem. Haskell
and the operating system are interacting poorly: buffered console
output is taking too long to get piped back to the test, or doesn't
pipe at all until a miracle occurs. Flushing the stream and closing
the handle are two ways to invoke such a miracle. Without them, the
test twiddles its thumbs for a while. With a 4-second killswitch, I
occasionally get tests that fail because the output *still* hasn't
come through in those four seconds.

Ideally those tests would each take milliseconds (not 1-4 seconds) and
we wouldn't have nondeterministic false negatives.

We could also look at modifying the executables (SnowdriftEmailDaemon
and SnowdriftProcessPayments) and see if we couldn't make them more
test-friendly.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Dev mailing list
[email protected]
https://lists.snowdrift.coop/mailman/listinfo/dev

Reply via email to