Permalink
Browse files

Leave UT commented for now.

  • Loading branch information...
1 parent 9b98bf3 commit bd660e493d8fdca428e9c0adc15ee3a46c5747c0 Andre Rodrigues committed Oct 12, 2012
Showing with 46 additions and 0 deletions.
  1. +46 −0 test/services/table/tableservice-batch-tests.js
View
46 test/services/table/tableservice-batch-tests.js
@@ -303,6 +303,52 @@ suite('tableservice-batch-tests', function () {
});
});
});
+
+ // TODO: fix
+/*
+ test('FailBatch', function (done) {
+ var tableName = testutil.generateId(tablePrefix, tableNames, tabletestutil.isMocked);
+
+ tableService.createTable(tableName, function (createError, table, createResponse) {
+ assert.equal(createError, null);
+ assert.notEqual(table, null);
+
+ assert.notEqual(createResponse, null);
+ if (createResponse) {
+ assert.ok(createResponse.isSuccessful);
+ }
+
+ var simpleEntity = {
+ PartitionKey: 'part',
+ RowKey: 1,
+ MyField: 'value'
+ };
+
+ tableService.beginBatch();
+
+ tableService.insertEntity(tableName, simpleEntity);
+
+ // Doing an update on the same entity within the same batch should make the batch fail
+ simpleEntity.MyField = 'othervalue';
+ tableService.updateEntity(tableName, simpleEntity);
+
+ tableService.commitBatch(function (batchError, performBatchOperationResponses, batchResponse) {
+ assert.equal(batchError, null);
+
+ assert.notEqual(performBatchOperationResponses, null);
+ assert.equal(performBatchOperationResponses.length, 1);
+ assert.notEqual(performBatchOperationResponses[0].error, null);
+ assert.equal(performBatchOperationResponses[0].error.code, Constants.StorageErrorCodeStrings.RESOURCE_NOT_FOUND);
+
+ assert.notEqual(batchResponse, null);
+ if (batchResponse) {
+ assert.ok(batchResponse.isSuccessful);
+ }
+
+ done();
+ });
+ });
+ });*/
});
function generateEntities(count) {

0 comments on commit bd660e4

Please sign in to comment.