зеркало из
1
0
Форкнуть 0

fixes based on Pierre's code review comments.

This commit is contained in:
Amar Zavery 2018-04-13 15:07:24 -07:00
Родитель 1aedbace49
Коммит 78b60d9da8
11 изменённых файлов: 14 добавлений и 14 удалений

4
dist/lib/eventHubReceiver.js поставляемый
Просмотреть файл

@ -68,7 +68,7 @@ class EventHubReceiver extends events_1.EventEmitter {
this.options = options;
this.receiverRuntimeMetricEnabled = options.enableReceiverRuntimeMetric || false;
this.runtimeInfo = {
paritionId: `${partitionId}`
partitionId: `${partitionId}`
};
const onMessage = (context) => {
const evData = _1.EventData.fromAmqpMessage(context.message);
@ -120,7 +120,7 @@ class EventHubReceiver extends events_1.EventEmitter {
yield utils_1.defaultLock.acquire(this._context.cbsSession.cbsLock, () => { return this._context.cbsSession.init(this._context.connection); });
const tokenObject = yield this._context.tokenProvider.getToken(this.audience);
debug(`[${this._context.connectionId}] EH Receiver: calling negotiateClaim for audience "${this.audience}"`);
// Negotitate the CBS claim.
// Negotiate the CBS claim.
yield this._context.cbsSession.negotiateClaim(this.audience, this._context.connection, tokenObject);
if (!this._session && !this._receiver) {
let receiverError;

2
dist/lib/eventHubReceiver.js.map поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

2
dist/lib/eventHubSender.js поставляемый
Просмотреть файл

@ -80,7 +80,7 @@ class EventHubSender extends events_1.EventEmitter {
yield utils_1.defaultLock.acquire(this._context.cbsSession.cbsLock, () => { return this._context.cbsSession.init(this._context.connection); });
const tokenObject = yield this._context.tokenProvider.getToken(this.audience);
debug(`[${this._context.connectionId}] EH Sender: calling negotiateClaim for audience "${this.audience}".`);
// Negotitate the CBS claim.
// Negotiate the CBS claim.
yield this._context.cbsSession.negotiateClaim(this.audience, this._context.connection, tokenObject);
if (!this._session && !this._sender) {
let senderError;

2
dist/lib/eventHubSender.js.map поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

2
dist/lib/rhea-promise/index.js поставляемый
Просмотреть файл

@ -6,7 +6,7 @@ const rhea = require("rhea");
const debugModule = require("debug");
const debug = debugModule("rhea-promise");
/**
* Eastablishes an amqp connection.
* Establishes an amqp connection.
* @param {ConnectionOptions} [options] Options to be provided for establishing an amqp connection.
* @return {Promise<Connection>} Promise<Connection>
* - **Resolves** the promise with the Connection object when rhea emits the "connection_open" event.

Просмотреть файл

@ -22,7 +22,7 @@ export interface ReceiverRuntimeInfo {
/**
* @property {string} partitionId The parition identifier.
*/
paritionId: string;
partitionId: string;
/**
* @property {number} lastSequenceNumber The logical sequence number of the event.
*/
@ -155,7 +155,7 @@ export class EventHubReceiver extends EventEmitter {
this.options = options;
this.receiverRuntimeMetricEnabled = options.enableReceiverRuntimeMetric || false;
this.runtimeInfo = {
paritionId: `${partitionId}`
partitionId: `${partitionId}`
};
const onMessage = (context: rheaPromise.Context) => {
@ -212,7 +212,7 @@ export class EventHubReceiver extends EventEmitter {
await defaultLock.acquire(this._context.cbsSession.cbsLock, () => { return this._context.cbsSession.init(this._context.connection); });
const tokenObject = await this._context.tokenProvider.getToken(this.audience);
debug(`[${this._context.connectionId}] EH Receiver: calling negotiateClaim for audience "${this.audience}"`);
// Negotitate the CBS claim.
// Negotiate the CBS claim.
await this._context.cbsSession.negotiateClaim(this.audience, this._context.connection, tokenObject);
if (!this._session && !this._receiver) {
let receiverError: any;

Просмотреть файл

@ -120,7 +120,7 @@ export class EventHubSender extends EventEmitter {
() => { return this._context.cbsSession.init(this._context.connection); });
const tokenObject = await this._context.tokenProvider.getToken(this.audience);
debug(`[${this._context.connectionId}] EH Sender: calling negotiateClaim for audience "${this.audience}".`);
// Negotitate the CBS claim.
// Negotiate the CBS claim.
await this._context.cbsSession.negotiateClaim(this.audience, this._context.connection, tokenObject);
if (!this._session && !this._sender) {
let senderError: any;

Просмотреть файл

@ -7,7 +7,7 @@ import * as debugModule from "debug";
const debug = debugModule("rhea-promise");
/**
* Eastablishes an amqp connection.
* Establishes an amqp connection.
* @param {ConnectionOptions} [options] Options to be provided for establishing an amqp connection.
* @return {Promise<Connection>} Promise<Connection>
* - **Resolves** the promise with the Connection object when rhea emits the "connection_open" event.

Просмотреть файл

@ -251,7 +251,7 @@ describe("EventHub Receiver", function () {
receiver.runtimeInfo!.lastEnqueuedOffset!.should.equal(pInfo.lastEnqueuedOffset);
receiver.runtimeInfo!.lastSequenceNumber!.should.equal(pInfo.lastSequenceNumber);
receiver.runtimeInfo!.lastEnqueuedTimeUtc!.getTime().should.equal(pInfo.lastEnqueuedTimeUtc.getTime());
receiver.runtimeInfo!.paritionId!.should.equal(pInfo.partitionId);
receiver.runtimeInfo!.partitionId!.should.equal(pInfo.partitionId);
receiver.runtimeInfo!.retrievalTime!.getTime().should.be.greaterThan(Date.now() - 60000);
});
});

2
typings/lib/eventHubReceiver.d.ts поставляемый
Просмотреть файл

@ -10,7 +10,7 @@ export interface ReceiverRuntimeInfo {
/**
* @property {string} partitionId The parition identifier.
*/
paritionId: string;
partitionId: string;
/**
* @property {number} lastSequenceNumber The logical sequence number of the event.
*/

2
typings/lib/rhea-promise/index.d.ts поставляемый
Просмотреть файл

@ -1,6 +1,6 @@
/// <reference types="node" />
/**
* Eastablishes an amqp connection.
* Establishes an amqp connection.
* @param {ConnectionOptions} [options] Options to be provided for establishing an amqp connection.
* @return {Promise<Connection>} Promise<Connection>
* - **Resolves** the promise with the Connection object when rhea emits the "connection_open" event.