Once the dog is sent, especially into the water, all guns are put on safe. The goal is to walk away with dead ducks not freakin dead dogs. Isn't that what hunting tests are supposed to simulate? Judges who do this sort of thing aren't doing anyone any favors. Throw the poison while the dog is on line watching, then run the blind. Same with diversions with dog coming back in. What sort of bone head is going to shoot at a dog out in the field.
In no way am I advocating to shoot directly over or at a dog coming in or going out (and you won't hunt with me again if you do that-- you may be lucky if you even get a ride home). However, at least in duck blind situations on water, it is not uncommon for birds to decoy in when dogs are on the water and not uncommon for hunters to shoot at them. And it is feasible a bird will drop within 20 feet of a dog. Obviously this requires that you know your hunting buddies and how they hunt around your dog and you, and have understanding of expectations. A duck shot at 40 yards out from the blind with the dog 40 yards out the other side making a retrieve poses not threat to your dog.....so the described set up would a least be acceptable to me. I haven't personally done field hunting for waterfowl, but expect the same thing is seen in this situation. Upland hunting is altogether different, but certainly if a cock pheasant flushes to the right 30 plus yards from a retriever running to the left to pick up a downed bird, one of the hunters in the line might knock that bird down assuming they are to the left of the dog (i.e. create a diversion).
Regarding the test described -- dropping the diversion so close (though as I mentioned, can happen in real life) does border on being unfair in my opinion, particularly to dogs that run like bullets. Any diversion that requires a gun to be fired (popper or other wise) in the line of a dog is indeed "bone head".