Skip to content

Commit 5e80899

Browse files
system tests (logging): remove consistency delay
1 parent 0c438e4 commit 5e80899

1 file changed

Lines changed: 2 additions & 51 deletions

File tree

system-test/logging.js

Lines changed: 2 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ var async = require('async');
2121
var exec = require('methmeth');
2222
var format = require('string-format-obj');
2323
var is = require('is');
24-
var prop = require('propprop');
2524
var uuid = require('node-uuid');
2625

2726
var env = require('./env.js');
@@ -32,7 +31,6 @@ var Storage = require('../lib/storage/index.js');
3231

3332
describe('Logging', function() {
3433
var TESTS_PREFIX = 'gcloud-logging-test';
35-
var WRITE_CONSISTENCY_DELAY_MS = 15000;
3634

3735
var logging = new Logging(env);
3836

@@ -315,36 +313,7 @@ describe('Logging', function() {
315313
});
316314

317315
it('should write multiple entries to a log', function(done) {
318-
log.write(logEntries, options, function(err) {
319-
assert.ifError(err);
320-
321-
setTimeout(function() {
322-
log.getEntries({
323-
pageSize: logEntries.length
324-
}, function(err, entries) {
325-
assert.ifError(err);
326-
327-
assert.deepEqual(entries.map(prop('data')).reverse(), [
328-
'log entry 1',
329-
{
330-
delegate: 'my_username'
331-
},
332-
{
333-
nonValue: null,
334-
boolValue: true,
335-
arrayValue: [ 1, 2, 3 ]
336-
},
337-
{
338-
nested: {
339-
delegate: 'my_username'
340-
}
341-
}
342-
]);
343-
344-
done();
345-
});
346-
}, WRITE_CONSISTENCY_DELAY_MS);
347-
});
316+
log.write(logEntries, options, done);
348317
});
349318

350319
it('should write an entry with primitive values', function(done) {
@@ -355,25 +324,7 @@ describe('Logging', function() {
355324
shouldNotBeSaved: undefined
356325
});
357326

358-
log.write(logEntry, options, function(err) {
359-
assert.ifError(err);
360-
361-
setTimeout(function() {
362-
log.getEntries({ pageSize: 1 }, function(err, entries) {
363-
assert.ifError(err);
364-
365-
var entry = entries[0];
366-
367-
assert.deepEqual(entry.data, {
368-
when: logEntry.data.when.toString(),
369-
matchUser: logEntry.data.matchUser.toString(),
370-
matchUserError: logEntry.data.matchUserError.toString()
371-
});
372-
373-
done();
374-
});
375-
}, WRITE_CONSISTENCY_DELAY_MS);
376-
});
327+
log.write(logEntry, options, done);
377328
});
378329

379330
it('should write to a log with alert helper', function(done) {

0 commit comments

Comments
 (0)