Previous studies have shown that a range of different stresses can increase mean lifespan. Here we investigated the effect of injuries and bacterial inoculation on mean lifespan in lines selected for increased longevity and their controls. The three lines from each selection regime were subjected to one of five treatments ranging from control, over perforating the cuticle with a sterile needle, to inoculating with peptidoglycan or one of two strains of live bacteria. The flies were subjected to the infection stress at two ages and the experiment was conducted on both males and females of replicate lines of each selection regime. The individual lines and sexes differed in response to the treatment. However, overall the sterile injury of young males resulted in prolonged mean lifespan from both selection regimes, whereas inoculating had no additional effect to stabbing with a sterile needle. In middle-aged males only treatment with peptidoglycan had a significant hormetic effect and this was only in longevity-selected flies. In females only one of the tested contrasts was significant and here the effect of the treatment was to reduce average lifespan. As could be expected, the results showed a significant interaction between the effects of sex and infection on survival.