Skip to content

fix e2e flakiness in pool-loads.spec.ts#2687

Merged
nwt merged 1 commit intomainfrom
fix-e2e-pool-loads
Mar 3, 2023
Merged

fix e2e flakiness in pool-loads.spec.ts#2687
nwt merged 1 commit intomainfrom
fix-e2e-pool-loads

Conversation

@nwt
Copy link
Member

@nwt nwt commented Mar 1, 2023

This fixes the following two e2e failures, which I often see.

$ yarn e2e pool-loads:17 pool-loads:26 --reporter=line

Running 2 tests using 1 worker
  1) pool-loads.spec.ts:17:3 › Pool Loads › load data into a pool ==================================

Error: expect(received).toEqual(expected) // deep equality

- Expected  - 4
+ Received  + 1

- Array [
-   "count",
-   "1",
- ]
+ Array []

  20 |     await app.query("count()")
  21 |     const results = await app.getViewerResults()
> 22 |     expect(results).toEqual(["count", "1"])
     |                     ^
  23 |     await app.mainWin.getByText("Load Successful").waitFor({state: "hidden"})
  24 |   })
  25 |

    at /Users/noah/brimdata/brim/packages/e2e-tests/tests/pool-loads.spec.ts:22:21

  2) pool-loads.spec.ts:26:3 › Pool Loads › load more data into the pool ===========================

Error: expect(received).toEqual(expected) // deep equality

- Expected  - 4
+ Received  + 1

- Array [
-   "count",
-   "2",
- ]
+ Array []

  34 |     await app.query("count()")
  35 |     const results = await app.getViewerResults()
> 36 |     expect(results).toEqual(["count", "2"])
     |                     ^
  37 |     await app.mainWin.getByText("Load Successful").waitFor({state: "hidden"})
  38 |   })
  39 |

    at /Users/noah/brimdata/brim/packages/e2e-tests/tests/pool-loads.spec.ts:36:21

  2 failed
pool-loads.spec.ts:17:3 › Pool Loads › load data into a pool ===================================
pool-loads.spec.ts:26:3 › Pool Loads › load more data into the pool ============================

This fixes the following two e2e failures, which I often see.

    $ yarn e2e pool-loads:17 pool-loads:26 --reporter=line

    Running 2 tests using 1 worker
      1) pool-loads.spec.ts:17:3 › Pool Loads › load data into a pool ==================================

	Error: expect(received).toEqual(expected) // deep equality

	- Expected  - 4
	+ Received  + 1

	- Array [
	-   "count",
	-   "1",
	- ]
	+ Array []

	  20 |     await app.query("count()")
	  21 |     const results = await app.getViewerResults()
	> 22 |     expect(results).toEqual(["count", "1"])
	     |                     ^
	  23 |     await app.mainWin.getByText("Load Successful").waitFor({state: "hidden"})
	  24 |   })
	  25 |

	    at /Users/noah/brimdata/brim/packages/e2e-tests/tests/pool-loads.spec.ts:22:21

      2) pool-loads.spec.ts:26:3 › Pool Loads › load more data into the pool ===========================

	Error: expect(received).toEqual(expected) // deep equality

	- Expected  - 4
	+ Received  + 1

	- Array [
	-   "count",
	-   "2",
	- ]
	+ Array []

	  34 |     await app.query("count()")
	  35 |     const results = await app.getViewerResults()
	> 36 |     expect(results).toEqual(["count", "2"])
	     |                     ^
	  37 |     await app.mainWin.getByText("Load Successful").waitFor({state: "hidden"})
	  38 |   })
	  39 |

	    at /Users/noah/brimdata/brim/packages/e2e-tests/tests/pool-loads.spec.ts:36:21

      2 failed
	pool-loads.spec.ts:17:3 › Pool Loads › load data into a pool ===================================
	pool-loads.spec.ts:26:3 › Pool Loads › load more data into the pool ============================
@nwt nwt requested a review from jameskerr March 1, 2023 21:30
Copy link
Contributor

@philrz philrz left a comment

Choose a reason for hiding this comment

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

It runs reliably for me in the branch. I've got high hopes this'll make it run reliably in Actions as well. 🤞

I also wanted to point out the comment a few lines up:

https://github.com/brimdata/brim/blob/8ecbc1a0c4904ad6019967c1d316c074dcbfb5d9/packages/e2e-tests/helpers/test-app.ts#L94

I'm not sure if more needs to be done beyond what's in this PR to meet the full definition of "wait for the cells to populate", but I'm guessing that comment should either now be removed or updated to estimate what more is left to be done.

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.

3 participants