Rocket mechanics replaced a faulty valve aboard the shuttle Discovery during the weekend and NASA will make a second attempt to test fire the ship's three main engines Wednesday, officials said Monday. Trouble with a hydrogen valve in main engine No. 2 aborted a test firing last Thursday, prompting NASA managers to order a replacement operation this weekend. Running ahead of schedule, engineers had installed the valve by late Saturday, tested it on Sunday and were "closing out" Discovery's aft engine compartment Monday. A NASA spokesman said the managers decided to proceed with the crucial engine test firing Wednesday.