A customer walks into a Dollar General store near Montpelier, Vermont.Adam Jeffery | CNBC Shares of discount retailer Dollar General soared Thursday after the company topped Wall Street expectations for revenue and offered a positive forecast despite trade war concerns.Dollar General climbed more than 10% after reporting adjusted earnings of $1.74 per share on $6.98 billion in revenue and raising its full year forecast for earnings and revenue. Analysts expected the company would earn $1.57 per share on $6.89 billion in revenue, according to Refinitiv.Same-store sales rose by 4% for the Tennessee-based company, compared with a consensus estimate of 2.4% from Refinitiv.Rival Dollar Tree missed earnings expectations, and its stock faded after an early jump in premarket trading. It rose by as much as 6%, but closed down 1.9% for the day. The company earned 76 cents per share after excluding one-time items. That was shy of the 81 cents per share analysts surveyed by Refinitiv were expecting.Revenue rose 3.9% to $5.74 billion, and topped the $5.71 billion in revenue predicted by analysts.The company saw same-store sales rise by 2.4%, compared with a consensus estimate of 1.9%.Dollar Tree also changed its full-year revenue estimates to between $23.57 billion and $23.79 billion. It previously expected a wider revenue range of $23.51 billion to $23.83 billion. Earnings per share are now predicted to be between $4.90 and $5.11, up from a range of $4.77 to $5.07.For the third quarter, Dollar Tree expects to earn $1.07 to $1.16 per share on sales of $5.66 billion to $5.77 billion.The changes in guidance for both companies come as retailers are facing pressure from a new batch of tariffs the U.S. will impose on goods imported from China. The new tariffs, slated to take effect in two rounds on Sept. 1 and Dec. 15, will impact many consumer items.”The Company is now implementing actions that may mitigate the recently announced tariff increases, and will continue to assess the future impact of those tariffs,” Dollar Tree said.Thursday’s spike continues a strong year for Dollar General’s stock. The company, which has a market cap of about $40 billion, has gained more than 40% so far this year.Shares of Dollar Tree, which has a market cap of roughly $23 billion, have risen more than 7% since the start of 2019.