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

Updated dependencies. Moved mocha options to package.json #75

Merged
merged 1 commit into from
Jan 19, 2020
Merged

Updated dependencies. Moved mocha options to package.json #75

merged 1 commit into from
Jan 19, 2020

Conversation

ravihara
Copy link

Updated all the dependencies using npm-check.
Created new instance of LRUCache in lib/counters/inMemory.js.
Added connection option in lib/config/test.js to setup higher heartbeats since, Subscription tests were failing because of heart beat timeout.
Bumped up package version to 7.0.1

Copy link
Collaborator

@cressie176 cressie176 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @ravihara,
Looks good. I'll merge tonight, probably with a couple of minor changes as discussed in the comments

options: {
heartbeat: 50,
},
},
namespace: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure why this caused tests to fail. Rascal defaults the heartbeat to 10 which is quite a long time in seconds. However it could be that some of the load or flow control tests are filling the event loop, meaning that the broker doesn't get a response. If that's the problem then this was a really good find. Wouldn't even has crossed my mind.

Copy link
Author

Choose a reason for hiding this comment

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

Yep! That could be the most obvious reason. It was failing randomly at various tests.. sometimes in Publications sometimes in Subscriptions.

const size = _.get(options, 'size') || 1000;
const cache = new LRUCache({
max: size,
});
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd change these back to vars, although I agree const would be better. The rascal code base is still ES5, even though it relies on modules that use const so there's no problem changing these. I'd rather keep the code base consistent for now and update the whole codebase at some point.


return {
incrementAndGet: function(key, next) {
incrementAndGet: function (key, next) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

The in-house style is no space between in function (. I'll update the linter to fix this automatically from now on.

@@ -1,6 +1,6 @@
{
"name": "rascal",
"version": "7.0.0",
"version": "7.0.1",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll bump this using npm version [patch|minor|major] so I get a tag. Not sure whether this is a patch though, since some of the deps have major version bumps. Will need to investigate a bit more closely.

Copy link
Author

Choose a reason for hiding this comment

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

As there was no major changes to features or new feature additions, I thought of bumping up only the patch part. Using an automated version bumper sound better too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

One of the bumps caused nodee v6 tests to fail (due to use of async). I've removed support for this but will bump to rascal 8.0.0

Copy link
Author

Choose a reason for hiding this comment

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

Right. I did observe this from circle.ci logs. I guess, it should be fine to remove Node 6.x support at this time :-).

"mocha": {
"timeout": 5000,
"checkLeaks": true,
"bail": true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there an advantage moving mocha opts to within package.json? I notice you dropped the recursive flag. Is this now a default?

Copy link
Author

@ravihara ravihara Jan 19, 2020

Choose a reason for hiding this comment

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

mocha.opts is deprecated now. There are couple of other alternatives suggested but, I felt keeping it in package.json (which is one of those recommended options) makes it more simpler. I didn't find recursive flag among the set of options in their documentation. Better to recheck once and confirm.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks. Didn't know mocha.opts was deprecated. Will go with the package.json config

@cressie176 cressie176 merged commit c19a945 into onebeyond:master Jan 19, 2020
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.

2 participants