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

test: do not trigger node bug with fd mapping #94

Merged
merged 3 commits into from
Feb 19, 2015
Merged

Conversation

sam-github
Copy link
Contributor

See nodejs/node#862

Note this is not enough to fix the tests, more subtle problems are causing the test failures for the express records.

/to @rmg this should effect tap, AFAICT.

/cc @bajtos

It was broken in f65aef4, which stopped passing the metrics arguments
(`runArgs`) to sl-run. With no `--metrics` arguments, no metrics are
reported, and the test started to fail.
@sam-github
Copy link
Contributor Author

I take it back, the problems weren't subtle, its just they were obscured by the node bug. Anyhow, I hope to see a green up above RSN.

logger: config.logger,
});
var agent = require('../lib/agent');
var options = {
Copy link
Member

Choose a reason for hiding this comment

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

It's really really minor, but could this be agentOptions to make the association more clear?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@rmg
Copy link
Member

rmg commented Feb 19, 2015

Before this PR I hadn't considered whether JS's switch did coercion or not.

TIL: JavaScript uses === for switch statements and therefore does not coerce. Handy!

Interestingly (to me, at least), Ruby also uses a === operator for its switch statement equivalent (case expressions), but the operator has completely different semantics.

@rmg
Copy link
Member

rmg commented Feb 19, 2015

Oh ya.. LGTM, other than a couple very minor style nits.

@rmg rmg assigned sam-github and unassigned rmg Feb 19, 2015
@bajtos
Copy link
Member

bajtos commented Feb 19, 2015

👍

Thanks for fixing this @sam-github

It used to be profiling was only started when StrongOps was started.

This caused problems for metrics and other users of the agent, because
when agent is no started first, it doesn't behave well. In particular,
it doesn't monkey patch anything, causing metrics to be lacking probe
metrics, and agent traces and express records not be available.
sam-github added a commit that referenced this pull request Feb 19, 2015
Fix bugs in and revealed by unit tests
@sam-github sam-github merged commit c44b0a0 into master Feb 19, 2015
@sam-github sam-github deleted the fix-fd-mapping branch February 19, 2015 18:12
@sam-github
Copy link
Contributor Author

I was a bit worried about the switch coercion, but I tested, and the docs are explicit, I'm glad it works!

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