[tpm] Perl, JBoss and STDOUT

arocker at vex.net arocker at vex.net
Thu Dec 18 16:23:37 PST 2008

If anybody still cares, the mystery turned out to have a very mundane
explanation; the test wasn't running the code I thought. It wasn't finding
the values it was seeking in STDOUT because they weren't there.

The original program, (which worked), included a big chunk of code that
was clearly going to be common to several programs, so I gutted it and
created a module from the entrails. The first revision omitted an
argument, which meant the Java program wouldn't even start. I fixed that
and forwarded the revisions to the QA people. Their tests continued to
work for several days, and I turned my attention to other problems. Then
the tests suddenly broke.

Clearly, (in retrospect), either I had sent the broken code instead of the
revision, or the revision hadn't been applied. The change was made on the
testing machine long enough afterwards that I didn't connect it with the
problem. After all, it was a simple refactoring that had apparently
worked, (because the original code was still being used for a while), and
there were all sorts of other revisions being made.

The lesson to draw from this is "If you refactor code, make sure that the
identical results really are being produced by the new code, not just the
old code continuing to run".

More information about the toronto-pm mailing list