FYI, to test if a socket works, you have to ground it. Take a piece of wire and touch the lamp wire on one end, and a ground on the other end. The side rail works fine.
To address a "fiddly" lamp, short of replacing the socket, you can always solder the lamp wire to the "nipple" of the socket. Usually helps in most cases. If it's still fiddly after that, then you'll have to replace the socket.