Cruise liners diverted ships and authorities tested water pumps that help control flooding, while urging residents in low-lying areas to get sandbags ready.