Comments (10)
Have a suspicion the flakiness comes partially from compilation step. There's a value testing against compiled files as that's what gets distributed. That said, think we might benefit from running the coverage against unprocessed source as that's the real and less prone to flakiness source of truth.
Have you had any successful experiments around this issue @shadowgate15 ?
from bree.
I'm adding few tests to increase test coverage and hopefully make the build pass at lease on Node v10. It still puzzles me what's the main source of difference between test coverage in v10 vs v12
from bree.
The master is š¢ again! Have added coverage and reworked how logger = _.cloneDeep(console)
was used. The problem with cloning console
is that it produces way to much junk output during the test run and was hiding the information about which test has caused an unhandled exception. Having explicit logger variable declarations also gives tests more readability imo.
from bree.
from bree.
@shadowgate15 is there a plan for this planned refactor somewhere? What is the goal that needs achieving through the refactor?
from bree.
from bree.
Sounds awesome. Having one giant test.js file was getting hard to reason about. Also would be good to clarify the cases when "serial" test cases should be used. My guess was they were made serial because of the flakiness?
from bree.
from bree.
So the flaky tests were coming from job terminates after closeWorkerAfterMs
. Below is my attempt to fix but it is still messing up. any thoughts @naz @niftylettuce?
test.serial('job terminates after closeWorkerAfterMs', async (t) => {
t.plan(2);
const logger = {};
logger.info = () => {};
logger.error = () => {};
const clock = FakeTimers.install({ now: Date.now() });
const bree = new Bree({
root,
jobs: [{ name: 'long', closeWorkerAfterMs: 100 }]
// Logger
});
bree.run('long');
const start = clock.now;
t.true(typeof bree.closeWorkerAfterMs.long === 'object');
await delay(1);
bree.workers.long.on('exit', (code) => {
t.is(start + 100, clock.now);
t.is(code, 1);
});
clock.runAll();
clock.uninstall();
});
from bree.
all good now
from bree.
Related Issues (20)
- jobs/index.js as an ESM module HOT 3
- [fix] Jobs starting slowly HOT 10
- [fix] Job does not repeat itself HOT 5
- [fix] Can't query database (postgresql) in worker HOT 2
- Segmentation Fault on arm64 HOT 5
- Typescript diagnostic errors HOT 2
- [fix] Unexpected high CPU use with 1s interval job HOT 10
- [fix] Doesn't start on Windows HOT 5
- [fix] defaultRootIndex is not working - also not a valid option
- [fix] Error when I tried to use dependencies into the job HOT 2
- [feat] function to list all runnning jobs HOT 1
- [fix] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME] HOT 3
- [fix] Cron last day of the month incorrect behaviour
- [fix] script works in main thread but fails in worker thread with FATAL ERROR or silent crash HOT 2
- Bree applied to data ingest HOT 1
- [fix] Missing await on 'start' function.
- [feat] Please Allow us to see what jobs are in the Que
- [fix] Types aren't making timeout and interval optional HOT 2
- cron job starts after timeout not after definition HOT 2
- [fix] Bree not working with Later HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bree.