Skip to content

Commit

Permalink
system tests (logging): remove consistency delay
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus committed Jul 18, 2016
1 parent 0c438e4 commit 5e80899
Showing 1 changed file with 2 additions and 51 deletions.
53 changes: 2 additions & 51 deletions system-test/logging.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ var async = require('async');
var exec = require('methmeth');
var format = require('string-format-obj');
var is = require('is');
var prop = require('propprop');
var uuid = require('node-uuid');

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

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

var logging = new Logging(env);

Expand Down Expand Up @@ -315,36 +313,7 @@ describe('Logging', function() {
});

it('should write multiple entries to a log', function(done) {
log.write(logEntries, options, function(err) {
assert.ifError(err);

setTimeout(function() {
log.getEntries({
pageSize: logEntries.length
}, function(err, entries) {
assert.ifError(err);

assert.deepEqual(entries.map(prop('data')).reverse(), [
'log entry 1',
{
delegate: 'my_username'
},
{
nonValue: null,
boolValue: true,
arrayValue: [ 1, 2, 3 ]
},
{
nested: {
delegate: 'my_username'
}
}
]);

done();
});
}, WRITE_CONSISTENCY_DELAY_MS);
});
log.write(logEntries, options, done);
});

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

log.write(logEntry, options, function(err) {
assert.ifError(err);

setTimeout(function() {
log.getEntries({ pageSize: 1 }, function(err, entries) {
assert.ifError(err);

var entry = entries[0];

assert.deepEqual(entry.data, {
when: logEntry.data.when.toString(),
matchUser: logEntry.data.matchUser.toString(),
matchUserError: logEntry.data.matchUserError.toString()
});

done();
});
}, WRITE_CONSISTENCY_DELAY_MS);
});
log.write(logEntry, options, done);
});

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

0 comments on commit 5e80899

Please sign in to comment.