The Massachusetts Turnpike, also known as I-90, will be reduced to two lanes in both directions this weekend, between the Allston Interchange and the Beacon Street overpass.

The state's Department of Transportation said the lane reduction, lasting from 11:59 p.m. on Friday, June 2, through 5 a.m. on Monday, June 5, is part of a "dry run" or "dress rehearsal" for its massive Commonwealth Avenue bridge replacement project this summer.

MassDOT said during the "dry run" they're closing the eastbound on-ramp from Cambridge Street to I-90 and the I-90 westbound "u-turn" to I-90 eastbound in Boston's Allston-Brighton neighborhood.

The Exit 20 westbound off-ramp will be closed on Sunday, and MassDOT is setting up a detour through Exit 16 in West Newton.

Transportation officials say drivers should think about taking the MBTA's Worcester/Framingham commuter rail line into the city as an alternative that weekend.

"We encourage all travelers to be mindful of the lane reductions this weekend, avoid traveling on I-90 in this area if at all possible, take public transit including commuter rail, and utilize the appropriate technology tools to make informed decisions before heading out onto the roadways, " acting state highway chief Jonathan Gulliver said in a statement.

The "dry run" is for logistics in the Commonwealth Avenue bridge replacement slated for this summer, running from Friday, July 28 to Monday, August 7.

The bridge replacement is slated to play out over two summers - this summer and summer 2018 -- and set to be finished in 2019 under a special accelerated construction plan. The eastbound portion of the bridge is getting replaced this year, and the westbound portion is slated for replacement in summer 2018.

Transportation officials say the project will add safety improvements to Commonwealth Avenue and dedicated bike lanes.

The summer project is expected to affect Amtrak service, as well as commuter rail service along the Worcester/Framingham line.