Skip to content

Commit

Permalink
chore: reword test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
aabmass committed Jun 16, 2021
1 parent a7cea78 commit bb0e436
Showing 1 changed file with 7 additions and 7 deletions.
Expand Up @@ -88,12 +88,12 @@ describe('CollectorExporterNodeBase', () => {
// Mock that all requests finish sending
exporter.sendCallbacks.forEach(({ onSuccess }) => onSuccess());

// All finished promises should be dropped off
// All finished promises should be popped off
await promisesAllDone;
assert.strictEqual(exporter['_sendingPromises'].length, 0);
});

it('should drop export requests when already sending concurrencyLimit', async () => {
it('should drop new export requests when already sending at concurrencyLimit', async () => {
const spans = [Object.assign({}, mockedReadableSpan)];
const numToExport = concurrencyLimit + 5;

Expand All @@ -106,12 +106,12 @@ describe('CollectorExporterNodeBase', () => {
// Mock that all requests finish sending
exporter.sendCallbacks.forEach(({ onSuccess }) => onSuccess());

// All finished promises should be dropped off
// All finished promises should be popped off
await promisesAllDone;
assert.strictEqual(exporter['_sendingPromises'].length, 0);
});

it('should drop export requests even if they failed', async () => {
it('should pop export request promises even if they failed', async () => {
const spans = [Object.assign({}, mockedReadableSpan)];

exporter.export(spans, () => {});
Expand All @@ -122,12 +122,12 @@ describe('CollectorExporterNodeBase', () => {
onError(new Error('Failed to send!!'))
);

// All finished promises should be dropped off
// All finished promises should be popped off
await promisesAllDone;
assert.strictEqual(exporter['_sendingPromises'].length, 0);
});

it('should drop export requests even if success callback throws error', async () => {
it('should pop export request promises even if success callback throws error', async () => {
const spans = [Object.assign({}, mockedReadableSpan)];

exporter['_sendPromise'](
Expand All @@ -145,7 +145,7 @@ describe('CollectorExporterNodeBase', () => {
onSuccess();
});

// All finished promises should be dropped off
// All finished promises should be popped off
await promisesAllDone;
assert.strictEqual(exporter['_sendingPromises'].length, 0);
});
Expand Down

0 comments on commit bb0e436

Please sign in to comment.