Mark Mielke escribió: > Most real life code gets a little more complicated. For example, > what if we want to simulate a network failure or "out of disk space" > condition? What if we want to test out what happens when the Y2038 > date is reached? This requires either complex test case setup that > is difficult to run reproducibly, or another approach - "mock". It > means doing things like overriding the write() method, and making it > return successful N times, and then failing on the (N+1)th time with > ENOSPC.
I remember a kernel simulator based on User-Mode Linux called UMLsim, with which you could stuff like this. It's dead at this point though, and I don't know if there's any replacement. -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers