Costco Wholesale Corp.’s first outlet in China opened on Tuesday and was soon overrun with customers willing to fight over discounted products and wait hours to pay for their purchases. The frenzy at Costco’s store comes at a time when the U.S. and China are locked in a tit-for-tat tariff war that shows no signs of abating and is making American firms wary of investing in the largest Asian economy.