How can I tell if a helmet will be comfortable before buying?
Put one on your head, adjust it to fit, and then try to slide it off your head in all directions. If you feel any pressure points or hot spots, you then need to determine if that will be alleviated by the little bits of foam included with most helmets, or if you need a different size or model of helmet.

As far as long-ride wear-ability is concerned, when you try on a helmet you need to be very aware of places the hard foam contacts your head. You also need to be aware of the weight of the helmet and ventilation when you start thinking about long rides. In most cases, for rides longer than about 2 hours, a more expensive (read: lighter and more ventilated) helmet will be more comfortable IF and only if it fits ok on your head.