Congress has until midnight on Friday to pass legislation funding the government as the fiscal year draws to a close. The process could get a little messy.

Many Senate Democrats — and some Republicans — have said they intend to oppose a short-term funding bill proposed by Senator Mitch McConnell, the Kentucky Republican and majority leader, setting the stage for a legislative scramble to avoid a government shutdown.

Among other things, Democrats are objecting that the legislation provides no money to deal with water contamination in Flint, Mich., located in a state with two Democratic senators, while it includes funds that could go for flood relief in Louisiana, which is represented by two Republicans. A test vote is set for Tuesday, and a rejection of the McConnell plan could make it difficult to find a new compromise in time to avert a shutdown.

Mr. McConnell will no doubt do what he can to avoid that situation, since he has made it a priority to evade such government disruptions, particularly with the election just over a month away. Democrats, aware of his predicament, will try to use their leverage to the full extent possible.