Testing Remote Client Scheduling

Ovid on 2009-09-17T12:14:59

Imagine a client (Java)/server (Perl) set up. The client reads data from the server and based on the data it receives, it writes data back to the server. The client is running on a remote host and we can't run it locally. If the client receives data which indicates a major amount of writes, it schedules the writes for a time when server load is lowered.

What we were thinking of is having acceptance tests which conceptually do this:

  1. Load a bunch of fixture data into server
  2. Notify client that data is available via a particular host:port
  3. Block until client has processed data
  4. Verify that correct data is available in server

This didn't look to hard, but with the "schedule later in the day" part, acceptance tests could block for hours. That sucks. What's the best way to test this when viewing the client as a black box?