stub client.close
This commit is contained in:
Родитель
8eebaf4db9
Коммит
4058e4d766
|
@ -51,6 +51,10 @@ EventHubClient.prototype.open = function () {
|
|||
return this._connectPromise;
|
||||
};
|
||||
|
||||
EventHubClient.prototype.close = function () {
|
||||
return Promise.resolve();
|
||||
};
|
||||
|
||||
EventHubClient.prototype.getPartitionIds = function () {
|
||||
return new Promise(function (resolve, reject) {
|
||||
var endpoint = '$management';
|
||||
|
|
|
@ -12,12 +12,19 @@ chai.use(chaiAsPromised);
|
|||
var EventHubClient = require('../lib/client.js');
|
||||
|
||||
describe('EventHubClient', function () {
|
||||
describe('#open', function () {
|
||||
this.timeout(15000);
|
||||
this.timeout(15000);
|
||||
|
||||
describe('#open', function () {
|
||||
it('opens a connection to the Event Hub', function () {
|
||||
var client = EventHubClient.fromConnectionString(process.env.EVENT_HUB_CONNECTION_STRING, process.env.EVENT_HUB_PATH);
|
||||
return client.open().should.be.fulfilled;
|
||||
});
|
||||
});
|
||||
|
||||
describe('#close', function () {
|
||||
it('is a no-op when the connection is already closed', function () {
|
||||
var client = EventHubClient.fromConnectionString(process.env.EVENT_HUB_CONNECTION_STRING, process.env.EVENT_HUB_PATH);
|
||||
return client.close().should.be.fulfilled;
|
||||
});
|
||||
});
|
||||
});
|
|
@ -12,6 +12,8 @@ var MessagingEntityNotFoundError = require('../lib/errors.js').MessagingEntityNo
|
|||
var ArgumentOutOfRangeError = require('../lib/errors.js').ArgumentOutOfRangeError;
|
||||
|
||||
describe('EventHubClient', function () {
|
||||
this.timeout(15000);
|
||||
|
||||
describe('#createReceiver', function () {
|
||||
it('returns a Receiver', function () {
|
||||
var client = EventHubClient.fromConnectionString(process.env.EVENT_HUB_CONNECTION_STRING, process.env.EVENT_HUB_PATH);
|
||||
|
|
Загрузка…
Ссылка в новой задаче