Skip to content
This repository has been archived by the owner on May 22, 2020. It is now read-only.

RUN-4017/services #113

Merged
merged 2 commits into from
Apr 19, 2018
Merged

RUN-4017/services #113

merged 2 commits into from
Apr 19, 2018

Conversation

pbaize
Copy link
Collaborator

@pbaize pbaize commented Apr 12, 2018

Passed tests on local machine

@pbaize pbaize requested review from rdepena and tgoc99 April 12, 2018 19:59
@pbaize pbaize changed the title passing tests RUN-4017/services Apr 13, 2018
Copy link
Member

@rdepena rdepena left a comment

Choose a reason for hiding this comment

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

Some neckbeard comments.

const mainAction = this.subscriptions.has(action)
? this.subscriptions.get(action)
: (payload: any, id: ServiceIdentity) => this.defaultAction(action, payload, id);
const a = this.preAction ? await this.preAction(action, payload, senderIdentity) : payload;
Copy link
Member

Choose a reason for hiding this comment

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

:neckbeard: lets get some meaningful variable names here.

this.serviceMap.set(serviceIdentity.uuid, channel);
return channel;
} catch (e) {
throw new Error(e.message);
Copy link
Member

Choose a reason for hiding this comment

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

Two questions:

  1. Why not throw e?

  2. if we are not handling the error in any meaningful way, why catch at all ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What we are catching is a nack from the core which is coming through as a RuntimeError, when this could very well be an intentional error from the user (ie authenticated Service). I'm catching it an throwing it back as a regular error because in those cases it is not a runtime error.

}

public async register(): Promise<Provider> {
try {
Copy link
Member

Choose a reason for hiding this comment

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

we can do without this try/catch.

}

public register(topic: string, listener: Action) {
//TODO create map of subscriptions
Copy link
Member

Choose a reason for hiding this comment

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

this TODO still relevant?

@rdepena rdepena merged commit 08fb001 into HadoukenIO:develop Apr 19, 2018
rdepena added a commit that referenced this pull request May 16, 2018
* RUN-3996 fixed a multi-runtime regression (#109)

* V bump.30.2 (#110) (#111)

* RUN-3996 fixed a multi-runtime regression (#109)

* Version bump to 30.2

* RUN-3999 multi runtime tests config update (#112)

* V bump.30.2 (#110)

* RUN-3996 fixed a multi-runtime regression (#109)

* Version bump to 30.2

* RUN-3999 Update multi runtime tests config

* Bug/run 3965 multi runtime cache clearing issue (#114)

* V bump.30.2 (#110)

* RUN-3996 fixed a multi-runtime regression (#109)

* Version bump to 30.2

* RUN-3965 Fix EPERM: operation not permitted

* RUN-3965 Fix some cache folders not deleted issue

* RUN-4017/services (#113)

* passing tests

* made changes

* RUN-4028 -  Async add listener (#115)

* V bump.30.2 (#110)

* RUN-3996 fixed a multi-runtime regression (#109)

* Version bump to 30.2

* some test fixes

* more timeouts in tests

* altered tests to check for awaiting newlistener

* undo unnecessary edit

* fix types of registereventlistener and unregister

* hold, fixed removeAllListeners but need to test

* added some tests

* added testing

* cleanup

* fix prependonce

*  bit more testing

* revert test changes

* changed class name, some cleanup

* make tests match new best practices

* name of test file

* tests cleanup

* back to arrows for tslint

* bind rawsend (#116)

* RUN-4045 register window name early in creation (#117)

* RUN-4033 plugin.import accepts a string (#118)

* Feature/test sledghammer (#119)

* sledghammer approach to fixing tests.

* taking a sledghammer to our Multi runtime tests.

* Moving back to es6 untill we hit a major version.

* A few items from the code review.

* code review items.

* code review items.

* V bump.30.2 (#110) (#121)

* RUN-3996 fixed a multi-runtime regression (#109)

* Version bump to 30.2

* RUN-3898 - External services tests (#120)

* hiold

* hold

* tests for external services re RUN-3898

* clean up

* Test fixed, no longer leaving around runtime (#122)

* test fixed, no longer leaving around runtime

* cleanup

* Fixed issue with the webpack grunt task where it was not reporting the errors correctly (#123)

* Fixed issue with the webpack grunt task where it was not reporting the errors correctly

* Passing error codes instead of arrays.

* version bump. (#124)
@rdepena rdepena mentioned this pull request May 16, 2018
rdepena added a commit that referenced this pull request May 16, 2018
* RUN-3996 fixed a multi-runtime regression (#109)

* V bump.30.2 (#110) (#111)

* RUN-3996 fixed a multi-runtime regression (#109)

* Version bump to 30.2

* RUN-3999 multi runtime tests config update (#112)

* V bump.30.2 (#110)

* RUN-3996 fixed a multi-runtime regression (#109)

* Version bump to 30.2

* RUN-3999 Update multi runtime tests config

* Bug/run 3965 multi runtime cache clearing issue (#114)

* V bump.30.2 (#110)

* RUN-3996 fixed a multi-runtime regression (#109)

* Version bump to 30.2

* RUN-3965 Fix EPERM: operation not permitted

* RUN-3965 Fix some cache folders not deleted issue

* RUN-4017/services (#113)

* passing tests

* made changes

* RUN-4028 -  Async add listener (#115)

* V bump.30.2 (#110)

* RUN-3996 fixed a multi-runtime regression (#109)

* Version bump to 30.2

* some test fixes

* more timeouts in tests

* altered tests to check for awaiting newlistener

* undo unnecessary edit

* fix types of registereventlistener and unregister

* hold, fixed removeAllListeners but need to test

* added some tests

* added testing

* cleanup

* fix prependonce

*  bit more testing

* revert test changes

* changed class name, some cleanup

* make tests match new best practices

* name of test file

* tests cleanup

* back to arrows for tslint

* bind rawsend (#116)

* RUN-4045 register window name early in creation (#117)

* RUN-4033 plugin.import accepts a string (#118)

* Feature/test sledghammer (#119)

* sledghammer approach to fixing tests.

* taking a sledghammer to our Multi runtime tests.

* Moving back to es6 untill we hit a major version.

* A few items from the code review.

* code review items.

* code review items.

* V bump.30.2 (#110) (#121)

* RUN-3996 fixed a multi-runtime regression (#109)

* Version bump to 30.2

* RUN-3898 - External services tests (#120)

* hiold

* hold

* tests for external services re RUN-3898

* clean up

* Test fixed, no longer leaving around runtime (#122)

* test fixed, no longer leaving around runtime

* cleanup

* Fixed issue with the webpack grunt task where it was not reporting the errors correctly (#123)

* Fixed issue with the webpack grunt task where it was not reporting the errors correctly

* Passing error codes instead of arrays.

* version bump. (#124)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants