Bitmessage/PyBitmessage

More thorough testing mode

PeterSurda opened this issue · 4 comments

Instead of just sleeping for 30 seconds before shutdown, the testing mode should:

  • create a new random address
  • send a message from that address to a testing address (TBD)
  • wait until the ACK arrives (UISignaller queue can be used for this)
  • show synchronisation progress and connection status every 10 seconds
  • wait until synchronisation finishes
  • change test mode description to explain it's for developers rather than end users

Agreed. As I wrote before, I'm in process of transforming that 30 sec timeout into 30 sec since last API command (after synchronization finish - with your elaboration). Basic testing I've planned to implement trough API commands (address creation, message sending). That's why I'm doing cleanup of the api module.

I think there should be a separate API test.

With API at least I understand how to implement such tests. You can check the first results in my branch test-mode. Otherwise the tests should apparently be asynchronous and will probably require sophisticated testing lib...

You can run the tests in the main thread (which normally runs the GUI and in the daemon mode does nothing). As for getting feedback, you just do a non-blocking get on the relevant queues (e.g. the ui signaller queue and address generator return queue) with a small timeout. It shouldn't be very difficult.