Skip to content

Language system-test fails because of returning Promise #1716

Description

@jmuk

Environment details

  • OS: Linux
  • Node.js version: v6.8.1
  • npm version: 3.10.8
  • google-cloud-node version: language / 0.3.0

Steps to reproduce

  1. cd packages/language
  2. npm run system-test (under proper environment variables)

Failures

  1) Language "after all" hook:
     TypeError: GCS.getBuckets(...).on is not a function
      at Context.<anonymous> (system-test/language.js:60:8)

As I quickly reviewed, GCS.getBuckets(...) seems to return a Promise, not a Stream, and the it returns an Array of buckets instead of stream.

I'm guessing recent packages/common/src/stream-router.js needs to be rewritten to support recent changes to Promise patterns.

cc: @jmdobry

Activity

  1. callmehiphop commented on Oct 18, 2016

    @callmehiphop
    Contributor

    @jmuk we just released changes today that moved all streaming APIs to their own methods (in this case GCS.getBuckets() became GCS.getBucketsStream()). So what you're describing is actually the expected behavior.

    If you update to [email protected] the error you're describing should disappear.

  2. stephenplusplus commented on Oct 18, 2016

    @stephenplusplus
    Contributor

    Yes, just rebase with master. The system tests depend on the latest release of @google-cloud/storage, which changed last night to promises.

  3. added a commit that references this issue on Mar 11, 2026
  4. added a commit that references this issue on Mar 27, 2026
  5. added a commit that references this issue on Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: languageIssues related to the Cloud Natural Language API API.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions