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

Minimize setTimeout delays in tests #137

Merged
merged 1 commit into from
Aug 27, 2014
Merged

Minimize setTimeout delays in tests #137

merged 1 commit into from
Aug 27, 2014

Conversation

ryanseys
Copy link
Contributor

Mocha was giving warnings that a few tests were running slowly. In both cases, the reason was that there was a setTimeout running a few callbacks under a significant delay. I reduced the time to 1ms and tests still passed so I don't see why the delay was necessary. If the delay is necessary, perhaps these tests should be failing under the new conditions I've set.

If someone can shed some light on why the callbacks are called under a setTimeout in the first place, that would also help me out.

@@ -76,7 +76,7 @@ describe('Connection', function() {
numTokenFetches++;
setTimeout(function() {
cb(null, tokenNeverExpires);
}, 100);
}, 1);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@rakyll
Copy link
Contributor

rakyll commented Aug 27, 2014

Could you lint your code? Use npm run lint.

@ryanseys
Copy link
Contributor Author

Oooh linting in travis. Very naise.
borat

@ryanseys
Copy link
Contributor Author

Should be good to go?

@stephenplusplus
Copy link
Contributor

Can you rebase against master, then squash? I think you've got an extra merge commit tagging along.

@ryanseys
Copy link
Contributor Author

Yeah I screwed up and didn't do this on a separate branch so I'll see what I can do... these are the dark sides of git I don't yet fully understand.

@ryanseys
Copy link
Contributor Author

Wow, first try! Sometimes I amaze myself. How's that look?

@stephenplusplus
Copy link
Contributor

these are the dark sides of git I don't yet fully understand.

Git: Every time you think you've found your way out, there's another dark alley waiting for you. ™️ 🔦

If it helps, my process is usually:

$ git checkout -b feature origin/master
# commit a bunch of work
$ git fetch origin
$ git rebase origin/master
# push to my remote

The key part being the rebase, which picks up your changes, syncs up with master, then plops your changes back down on top of them.

@stephenplusplus
Copy link
Contributor

It's perfect! Thanks 👯

stephenplusplus added a commit that referenced this pull request Aug 27, 2014
Minimize setTimeout delays in tests
@stephenplusplus stephenplusplus merged commit 0615c6e into googleapis:master Aug 27, 2014
sofisl pushed a commit that referenced this pull request Sep 27, 2022
sofisl pushed a commit that referenced this pull request Oct 13, 2022
sofisl pushed a commit that referenced this pull request Oct 13, 2022
🤖 I have created a release \*beep\* \*boop\*
---
### [1.4.6](https://www.github.com/googleapis/nodejs-memcache/compare/v1.4.5...v1.4.6) (2021-07-21)


### Bug Fixes

* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#136](https://www.github.com/googleapis/nodejs-memcache/issues/136)) ([619f23e](https://www.github.com/googleapis/nodejs-memcache/commit/619f23ec0c25c8e5dd97894ada5f65ae763d2721))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
sofisl pushed a commit that referenced this pull request Oct 13, 2022
…andwritten libraries (#137)

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 429395631

Source-Link: googleapis/googleapis@84594b3

Source-Link: googleapis/googleapis-gen@ed74f97
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9
sofisl pushed a commit that referenced this pull request Nov 11, 2022
sofisl pushed a commit that referenced this pull request Nov 11, 2022
* chore(main): release 2.1.1

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Nov 11, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>sinonjs/sinon</summary>

### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#&#8203;1400)

[Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0)

-   [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00)
    Drop node 12 (Morgan Roderick)
    > And embrace Node 18
    >
    > See https://nodejs.org/en/about/releases/

*Released by Morgan Roderick on 2022-05-07.*

</details>

---

### Configuration

📅 **Schedule**: "after 9am and before 3pm" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-service-management).
sofisl pushed a commit that referenced this pull request Nov 11, 2022
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Nov 11, 2022
samples: pull in latest typeless bot, clean up some comments

Source-Link: https://togithub.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e
sofisl pushed a commit that referenced this pull request Nov 11, 2022
🤖 I have created a release *beep* *boop*
---


## [2.0.3](https://togithub.com/googleapis/nodejs-org-policy/compare/v2.0.2...v2.0.3) (2022-11-11)


### Bug Fixes

* Allow passing gax instance to client constructor ([#126](https://togithub.com/googleapis/nodejs-org-policy/issues/126)) ([c7147d4](https://togithub.com/googleapis/nodejs-org-policy/commit/c7147d40a9ed114ec42997d49c2f5dfcff948aad))
* **deps:** Use google-gax v3.5.2 ([#134](https://togithub.com/googleapis/nodejs-org-policy/issues/134)) ([0f1bfb0](https://togithub.com/googleapis/nodejs-org-policy/commit/0f1bfb0007ade736c2ec91f32ff187c80b2d6761))
* Do not import the whole google-gax from proto JS ([#1553](https://togithub.com/googleapis/nodejs-org-policy/issues/1553)) ([#125](https://togithub.com/googleapis/nodejs-org-policy/issues/125)) ([068b0a5](https://togithub.com/googleapis/nodejs-org-policy/commit/068b0a55fe805cedab9e66f62071c8be56f465ed))
* Preserve default values in x-goog-request-params header ([#128](https://togithub.com/googleapis/nodejs-org-policy/issues/128)) ([3f80014](https://togithub.com/googleapis/nodejs-org-policy/commit/3f80014a3c75311555df6cfde8470ae1f72a686f))
* Regenerated protos JS and TS definitions ([#137](https://togithub.com/googleapis/nodejs-org-policy/issues/137)) ([1606459](https://togithub.com/googleapis/nodejs-org-policy/commit/1606459c847f2ed945dccc8e43d57d273fac7ea9))
* use google-gax v3.3.0 ([068b0a5](https://togithub.com/googleapis/nodejs-org-policy/commit/068b0a55fe805cedab9e66f62071c8be56f465ed))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
sofisl pushed a commit that referenced this pull request Nov 16, 2022
* feat: support regapic LRO

Use gapic-generator-typescript v2.15.1.

PiperOrigin-RevId: 456946341

Source-Link: googleapis/googleapis@88fd18d

Source-Link: googleapis/googleapis-gen@accfa37
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Nov 16, 2022
🤖 I have created a release *beep* *boop*
---


## [2.1.0](googleapis/nodejs-managed-identities@v2.0.0...v2.1.0) (2022-06-30)


### Features

* support regapic LRO ([#137](googleapis/nodejs-managed-identities#137)) ([ee4fadb](googleapis/nodejs-managed-identities@ee4fadb))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
sofisl pushed a commit that referenced this pull request Nov 16, 2022
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/nodejs-retail/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)
sofisl pushed a commit that referenced this pull request Nov 17, 2022
* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual

* chore: assert.deelEqual => assert.deepStrictEqual
sofisl pushed a commit that referenced this pull request Nov 18, 2022
sofisl pushed a commit that referenced this pull request Nov 30, 2022
sofisl pushed a commit that referenced this pull request Jan 24, 2023
sofisl pushed a commit that referenced this pull request Jan 25, 2023
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