git.delta.rocks / unique-network / refs/commits / 9ddec87093e6

difftreelog

turn off collision-tests

Igor Kozyrev2021-11-08parent: #b1a1af7.patch.diff
in: master

10 files changed

modifiedtests/src/collision-tests/admVsOwnerChanges.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/admVsOwnerChanges.test.ts
+++ b/tests/src/collision-tests/admVsOwnerChanges.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
 import { IKeyringPair } from '@polkadot/types/types';
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
@@ -50,3 +54,4 @@
     });
   });
 });
+*/
\ No newline at end of file
modifiedtests/src/collision-tests/admVsOwnerData.test.tsdiffbeforeafterboth
before · tests/src/collision-tests/admVsOwnerData.test.ts
1import { IKeyringPair } from '@polkadot/types/types';2import chai from 'chai';3import chaiAsPromised from 'chai-as-promised';4import privateKey from '../substrate/privateKey';5import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';6import {7  createCollectionExpectSuccess,8  createItemExpectSuccess,9  normalizeAccountId,10  waitNewBlocks,11} from '../util/helpers';1213chai.use(chaiAsPromised);14const expect = chai.expect;15let Alice: IKeyringPair;16let Bob: IKeyringPair;1718before(async () => {19  await usingApi(async () => {20    Alice = privateKey('//Alice');21    Bob = privateKey('//Bob');22  });23});2425describe('Admin vs Owner changes the data in the token: ', () => {26  it('The collection admin changes the data in the token and in the same block the token owner also changes the data in it ', async () => {27    await usingApi(async (api) => {28      const AliceData = 1;29      const BobData = 2;30      const collectionId = await createCollectionExpectSuccess();31      const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));32      await submitTransactionAsync(Alice, changeAdminTx);33      const itemId = await createItemExpectSuccess(Bob, collectionId, 'NFT');34      //35      // tslint:disable-next-line: max-line-length36      const AliceTx = api.tx.nft.setVariableMetaData(collectionId, itemId, AliceData.toString());37      // tslint:disable-next-line: max-line-length38      const BobTx = api.tx.nft.setVariableMetaData(collectionId, itemId, BobData.toString());39      await Promise.all([40        AliceTx.signAndSend(Alice),41        BobTx.signAndSend(Bob),42      ]);43      const item: any = await api.query.nft.nftItemList(collectionId, itemId);44      expect(item.variableData).not.to.be.eq(null); // Pseudo-random selection of one of two values45      await waitNewBlocks(2);46    });47  });48});
after · tests/src/collision-tests/admVsOwnerData.test.ts
1/* broken by design2// substrate transactions are sequential, not parallel3// the order of execution is indeterminate45import { IKeyringPair } from '@polkadot/types/types';6import chai from 'chai';7import chaiAsPromised from 'chai-as-promised';8import privateKey from '../substrate/privateKey';9import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';10import {11  createCollectionExpectSuccess,12  createItemExpectSuccess,13  normalizeAccountId,14  waitNewBlocks,15} from '../util/helpers';1617chai.use(chaiAsPromised);18const expect = chai.expect;19let Alice: IKeyringPair;20let Bob: IKeyringPair;2122before(async () => {23  await usingApi(async () => {24    Alice = privateKey('//Alice');25    Bob = privateKey('//Bob');26  });27});2829describe('Admin vs Owner changes the data in the token: ', () => {30  it('The collection admin changes the data in the token and in the same block the token owner also changes the data in it ', async () => {31    await usingApi(async (api) => {32      const AliceData = 1;33      const BobData = 2;34      const collectionId = await createCollectionExpectSuccess();35      const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));36      await submitTransactionAsync(Alice, changeAdminTx);37      const itemId = await createItemExpectSuccess(Bob, collectionId, 'NFT');38      //39      // tslint:disable-next-line: max-line-length40      const AliceTx = api.tx.nft.setVariableMetaData(collectionId, itemId, AliceData.toString());41      // tslint:disable-next-line: max-line-length42      const BobTx = api.tx.nft.setVariableMetaData(collectionId, itemId, BobData.toString());43      await Promise.all([44        AliceTx.signAndSend(Alice),45        BobTx.signAndSend(Bob),46      ]);47      const item: any = await api.query.nft.nftItemList(collectionId, itemId);48      expect(item.variableData).not.to.be.eq(null); // Pseudo-random selection of one of two values49      await waitNewBlocks(2);50    });51  });52});53*/
modifiedtests/src/collision-tests/admVsOwnerTake.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/admVsOwnerTake.test.ts
+++ b/tests/src/collision-tests/admVsOwnerTake.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
 import { IKeyringPair } from '@polkadot/types/types';
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
@@ -48,3 +52,4 @@
     });
   });
 });
+*/
\ No newline at end of file
modifiedtests/src/collision-tests/adminDestroyCollection.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/adminDestroyCollection.test.ts
+++ b/tests/src/collision-tests/adminDestroyCollection.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
 import { IKeyringPair } from '@polkadot/types/types';
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
@@ -47,3 +51,4 @@
     });
   });
 });
+*/
\ No newline at end of file
modifiedtests/src/collision-tests/adminLimitsOff.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/adminLimitsOff.test.ts
+++ b/tests/src/collision-tests/adminLimitsOff.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
 import { IKeyringPair } from '@polkadot/types/types';
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
@@ -63,3 +67,4 @@
     });
   });
 });
+*/
\ No newline at end of file
modifiedtests/src/collision-tests/adminRightsOff.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/adminRightsOff.test.ts
+++ b/tests/src/collision-tests/adminRightsOff.test.ts
@@ -1,4 +1,6 @@
-/* obsolete
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
 
 import { IKeyringPair } from '@polkadot/types/types';
 import BN from 'bn.js';
@@ -48,5 +50,4 @@
     });
   });
 });
-
 */
\ No newline at end of file
modifiedtests/src/collision-tests/setSponsorNewOwner.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/setSponsorNewOwner.test.ts
+++ b/tests/src/collision-tests/setSponsorNewOwner.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
 import { IKeyringPair } from '@polkadot/types/types';
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
@@ -44,3 +48,4 @@
     });
   });
 });
+*/
\ No newline at end of file
modifiedtests/src/collision-tests/sponsorPayments.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/sponsorPayments.test.ts
+++ b/tests/src/collision-tests/sponsorPayments.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
 import { IKeyringPair } from '@polkadot/types/types';
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
@@ -53,3 +57,4 @@
     });
   });
 });
+*/
\ No newline at end of file
modifiedtests/src/collision-tests/tokenLimitsOff.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/tokenLimitsOff.test.ts
+++ b/tests/src/collision-tests/tokenLimitsOff.test.ts
@@ -1,4 +1,7 @@
-/* obsolete
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
 import { IKeyringPair } from '@polkadot/types/types';
 import BN from 'bn.js';
 import chai from 'chai';
modifiedtests/src/collision-tests/turnsOffMinting.test.tsdiffbeforeafterboth
--- a/tests/src/collision-tests/turnsOffMinting.test.ts
+++ b/tests/src/collision-tests/turnsOffMinting.test.ts
@@ -1,3 +1,7 @@
+/* broken by design
+// substrate transactions are sequential, not parallel
+// the order of execution is indeterminate
+
 import { IKeyringPair } from '@polkadot/types/types';
 import chai from 'chai';
 import chaiAsPromised from 'chai-as-promised';
@@ -45,3 +49,4 @@
     });
   });
 });
+*/
\ No newline at end of file