Skip to content
This repository
Browse code

Leave UT commented for now.

  • Loading branch information...
commit bd660e493d8fdca428e9c0adc15ee3a46c5747c0 1 parent 9b98bf3
André Rodrigues authored October 13, 2012
46  test/services/table/tableservice-batch-tests.js
@@ -303,6 +303,52 @@ suite('tableservice-batch-tests', function () {
303 303
       });
304 304
     });
305 305
   });
  306
+
  307
+  // TODO: fix
  308
+/*
  309
+  test('FailBatch', function (done) {
  310
+    var tableName = testutil.generateId(tablePrefix, tableNames, tabletestutil.isMocked);
  311
+
  312
+    tableService.createTable(tableName, function (createError, table, createResponse) {
  313
+      assert.equal(createError, null);
  314
+      assert.notEqual(table, null);
  315
+
  316
+      assert.notEqual(createResponse, null);
  317
+      if (createResponse) {
  318
+        assert.ok(createResponse.isSuccessful);
  319
+      }
  320
+
  321
+      var simpleEntity = {
  322
+        PartitionKey: 'part',
  323
+        RowKey: 1,
  324
+        MyField: 'value'
  325
+      };
  326
+
  327
+      tableService.beginBatch();
  328
+
  329
+      tableService.insertEntity(tableName, simpleEntity);
  330
+
  331
+      // Doing an update on the same entity within the same batch should make the batch fail
  332
+      simpleEntity.MyField = 'othervalue';
  333
+      tableService.updateEntity(tableName, simpleEntity);
  334
+
  335
+      tableService.commitBatch(function (batchError, performBatchOperationResponses, batchResponse) {
  336
+        assert.equal(batchError, null);
  337
+
  338
+        assert.notEqual(performBatchOperationResponses, null);
  339
+        assert.equal(performBatchOperationResponses.length, 1);
  340
+        assert.notEqual(performBatchOperationResponses[0].error, null);
  341
+        assert.equal(performBatchOperationResponses[0].error.code, Constants.StorageErrorCodeStrings.RESOURCE_NOT_FOUND);
  342
+
  343
+        assert.notEqual(batchResponse, null);
  344
+        if (batchResponse) {
  345
+          assert.ok(batchResponse.isSuccessful);
  346
+        }
  347
+
  348
+        done();
  349
+      });
  350
+    });
  351
+  });*/
306 352
 });
307 353
 
308 354
 function generateEntities(count) {

0 notes on commit bd660e4

Please sign in to comment.
Something went wrong with that request. Please try again.