Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add test for cached res timings #489

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

vigneshshanmugam
Copy link
Member

@vigneshshanmugam vigneshshanmugam commented Apr 12, 2022

Screen Shot 2022-04-12 at 12 14 16 PM

Screen Shot 2022-04-12 at 12 14 23 PM

Steps to check

  1. Create inline journey with the example given on the issue.
step("My Page", async () => {
   await page.goto('https://paulb-elastic.github.io/testPageWithCounter.html');
   await page.waitForSelector('#counter >> text=Seconds since page loaded: 2');
});
step("Cached version of My Page", async () => {
   await page.goto('https://paulb-elastic.github.io/testPageWithCounter.html');
   await page.waitForSelector('#counter >> text=Seconds since page loaded: 2');
});
  1. Run the synthetics CLI from local and ensure the timing data is correct
cat examples/inline/example.js | node dist/cli.js --inline --rich-events
  1. Install the current synthetics version globally npm install -g .and run it as inline monitor.
  - type: browser
    id: cache-test
    name: Cached-steps
    schedule: "@every 1m"
    source:
      inline:
        script: step("My Page", async () => {
          await page.goto("https://paulb-elastic.github.io/testPageWithCounter.html");
          });
          step("Cached version of My Page", async () => {
          await page.goto('https://paulb-elastic.github.io/testPageWithCounter.html');
          });

@@ -150,7 +150,6 @@ describe('network', () => {
await driver.page.goto(server.PREFIX + '/index', {
waitUntil: 'networkidle',
});
await driver.page.waitForLoadState();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant, we wait until the idle part anyway in the previous line.

@apmmachine
Copy link

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-04-12T19:04:28.225+0000

  • Duration: 15 min 51 sec

Test stats 🧪

Test Results
Failed 0
Passed 149
Skipped 2
Total 151

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, CI is passing, test looks good

@vigneshshanmugam vigneshshanmugam merged commit 276530a into elastic:main Apr 12, 2022
@vigneshshanmugam vigneshshanmugam deleted the add-cached-check branch April 12, 2022 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Content download wrong for cached requests
3 participants