The Senate is nearing a key test vote as lawmakers work to avoid a partial government shutdown with just hours to spare.