message: e2e-test: add retries to app serve
diff: @@ -276,6 +276,8 @@ async function testAppServe(pluginName: string, appDir: string) {
  Browser.localhost('localhost', 3000);
  let successful = false;
  + try {
  + for (let attempts = 1; ; attempts++) {
  try {
  const browser = new Browser();
  @@ -288,8 +290,15 @@ async function testAppServe(pluginName: string, appDir: string) {
  print('Both App and Plugin loaded correctly');
  successful = true;
  + break;
  } catch (error) {
  + if (attempts >= 5) {
  throw new Error(`App serve test failed, ${error}`);
  + }
  + console.log(`App serve failed, trying again, ${error}`);
  + await new Promise(resolve => setTimeout(resolve, 1000));
  + }
  + }
  } finally {
  // Kill entire process group, otherwise we'll end up with hanging serve processes
  killTree(startApp.pid);
  