difftreelog
turn off collision-tests
in: master
10 files changed
tests/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
tests/src/collision-tests/admVsOwnerData.test.tsdiffbeforeafterboth1import { IKeyringPair } from '@polkadot/types/types';1/* broken by design2import chai from 'chai';2// substrate transactions are sequential, not parallel3import chaiAsPromised from 'chai-as-promised';3// the order of execution is indeterminate4import privateKey from '../substrate/privateKey';45import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';5import { IKeyringPair } from '@polkadot/types/types';6import {6import chai from 'chai';7 createCollectionExpectSuccess,7import chaiAsPromised from 'chai-as-promised';8 createItemExpectSuccess,8import privateKey from '../substrate/privateKey';9 normalizeAccountId,9import usingApi, { submitTransactionAsync } from '../substrate/substrate-api';10 waitNewBlocks,10import {11} from '../util/helpers';11 createCollectionExpectSuccess,1212 createItemExpectSuccess,13chai.use(chaiAsPromised);13 normalizeAccountId,14const expect = chai.expect;14 waitNewBlocks,15let Alice: IKeyringPair;15} from '../util/helpers';16let Bob: IKeyringPair;161717chai.use(chaiAsPromised);18before(async () => {18const expect = chai.expect;19 await usingApi(async () => {19let Alice: IKeyringPair;20 Alice = privateKey('//Alice');20let Bob: IKeyringPair;21 Bob = privateKey('//Bob');2122 });22before(async () => {23});23 await usingApi(async () => {2424 Alice = privateKey('//Alice');25describe('Admin vs Owner changes the data in the token: ', () => {25 Bob = privateKey('//Bob');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 () => {26 });27 await usingApi(async (api) => {27});28 const AliceData = 1;2829 const BobData = 2;29describe('Admin vs Owner changes the data in the token: ', () => {30 const collectionId = await createCollectionExpectSuccess();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 const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));31 await usingApi(async (api) => {32 await submitTransactionAsync(Alice, changeAdminTx);32 const AliceData = 1;33 const itemId = await createItemExpectSuccess(Bob, collectionId, 'NFT');33 const BobData = 2;34 //34 const collectionId = await createCollectionExpectSuccess();35 // tslint:disable-next-line: max-line-length35 const changeAdminTx = api.tx.nft.addCollectionAdmin(collectionId, normalizeAccountId(Bob.address));36 const AliceTx = api.tx.nft.setVariableMetaData(collectionId, itemId, AliceData.toString());36 await submitTransactionAsync(Alice, changeAdminTx);37 // tslint:disable-next-line: max-line-length37 const itemId = await createItemExpectSuccess(Bob, collectionId, 'NFT');38 const BobTx = api.tx.nft.setVariableMetaData(collectionId, itemId, BobData.toString());38 //39 await Promise.all([39 // tslint:disable-next-line: max-line-length40 AliceTx.signAndSend(Alice),40 const AliceTx = api.tx.nft.setVariableMetaData(collectionId, itemId, AliceData.toString());41 BobTx.signAndSend(Bob),41 // tslint:disable-next-line: max-line-length42 ]);42 const BobTx = api.tx.nft.setVariableMetaData(collectionId, itemId, BobData.toString());43 const item: any = await api.query.nft.nftItemList(collectionId, itemId);43 await Promise.all([44 expect(item.variableData).not.to.be.eq(null); // Pseudo-random selection of one of two values44 AliceTx.signAndSend(Alice),45 await waitNewBlocks(2);45 BobTx.signAndSend(Bob),46 });46 ]);47 });47 const item: any = await api.query.nft.nftItemList(collectionId, itemId);48});48 expect(item.variableData).not.to.be.eq(null); // Pseudo-random selection of one of two values4949 await waitNewBlocks(2);50 });51 });52});53*/tests/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
tests/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
tests/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
tests/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
tests/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
tests/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
tests/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';
tests/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