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
1import { IKeyringPair } from '@polkadot/types/types';1/* broken by design
2import chai from 'chai';2// substrate transactions are sequential, not parallel
3import chaiAsPromised from 'chai-as-promised';3// the order of execution is indeterminate
4import privateKey from '../substrate/privateKey';4
5import 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;16
1717chai.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');21
22 });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;28
29 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-length
40 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-length
42 ]);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 values
4949 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