From: Mathieu Bouchard Date: 2000-10-10T13:20:57+09:00 Subject: [ruby-talk:5362] Re: Unit testing network code? > I think maybe one would test each end on its own first, faking the > communication between them, then start up both ends together and cause > them to interact. That seems fair enough but when the network is not > reliable (UDP for example), how does one isolate the different problems > introduced by a lossy network from each other and from the property being > tested? This seems to be heavily architecture-dependent. Maybe there could be an alternate version of the inet loopback (lo.o ?) module in Linux that could do that... when the address matches a certain pattern (127.1.*.*) it would drop packets according to a certain characteristic. Maybe you could suggest the idea on the Linux kernel mailing-list. Otherwise, a simple UDP/TCP emulator/filter could be written in Ruby, and you would add rules of packet-dropping in it. This would be less universal (Ruby only, and must be used explicitly) but much easier to write. matju