Commit Graph

10 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan 41f8bff2c3
DEV: Remove superfluous `js: true` metadata (#21960)
Why this change?

It is very unlikely that we need to ever JS for system tests considering
that we rely on a JS framework on the frontend.
2023-06-07 09:26:58 +08:00
Alan Guo Xiang Tan 4dd053a69c
DEV: Call `MessageBus.stop()` after each system test (#21848)
## What is the problem?

MessageBus by default uses long polling which keeps a connection
open for 25 seconds by default. The problem here is that Capybara does not know about these
connections being kept opened by MessageBus and hence does not know how
to stop these connections at the end of each test. As a result, the long polling MessageBus connections are kept opened by the browser and we hit chrome's limit of 6 concurrent requests per host, new request made in the browser is marked as "pending" until a request is freed up. Since we keep a MessageBus long polling connection opened for 25 seconds, our finders in Capybara end up hitting Capybara's wait time out causing the tests to fail.  

## What is the fix?

Since we can't rely on Capybara to close all the existing Capybara
connections, we manually execute a script to stop all MessageBus
connections after each system test.

```
for i in {1..10}; do
  echo "Running iteration $i"
  PARALLEL_TEST_PROCESSORS=8 CAPYBARA_DEFAULT_MAX_WAIT_TIME=10 bin/turbo_rspec --seed=34908 --profile --verbose --format documentation spec/system
  if [ $? -ne 0 ]; then
    echo "Error encountered on iteration $i"
    exit 1
  fi
done
echo "All 10 iterations completed successfully"
```

Without the fix, the script fails consistently in the first few iterations. Running in non-headless mode with the "network" tab opened will reveal the requests that are marked as pending.
2023-05-31 21:00:35 +08:00
Keegan George 3a54f81bf4
DEV: Skip flaky form template spec (#21838) 2023-05-30 13:55:03 -07:00
Keegan George 856c4ed295
DEV: Remove skipped form template system spec (#21832)
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2023-05-30 20:37:32 +02:00
Keegan George c74c90bae5
DEV: Show form templates in the composer (#21190) 2023-05-29 14:47:18 -07:00
Alan Guo Xiang Tan 8a9d3b3eed
DEV: Skip flaky system tests on CI (#undefined) 2023-05-29 15:03:49 +08:00
Keegan George bb0ef4c7b4
DEV: Show active categories in form templates customize table (#20498) 2023-03-01 12:37:14 -08:00
Keegan George 666b4a7e6b
DEV: Define form template field inputs (#20430) 2023-03-01 11:07:13 -08:00
Keegan George 5a94b33b3f
DEV: Assign `TODO` to `@keegan` (#20224) 2023-02-08 17:01:52 -08:00
Keegan George 871607a420
DEV: Create form templates (#20189) 2023-02-08 11:21:39 -08:00