Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/kind-lions-cut.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 1 addition & 1 deletion tests/workflow-tengo/src/pframes/test/ll.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ tplTest.concurrent.for([
},
);

eTplTest(
eTplTest.concurrent(
'should correctly execute low level aggregation routine with xsv parsing',
async ({ helper, expect, stHelper }) => {
const xsvSettings = {
Expand Down
12 changes: 8 additions & 4 deletions tests/workflow-tengo/src/pframes/test/pframe.export.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const baseSpec = {
annotations: {},
};

tplTest('should export files for p-frame without skipExportForUI annotation', { timeout: 40000 },
tplTest.concurrent('should export files for p-frame without skipExportForUI annotation', { timeout: 40000 },
async ({ helper, expect, driverKit }) => {
const spec = baseSpec;
const spec = deepClone(baseSpec);
const fileHandle = await importFile(driverKit);

const result = await helper.renderTemplate(
Expand Down Expand Up @@ -43,9 +43,9 @@ tplTest('should export files for p-frame without skipExportForUI annotation', {
},
);

tplTest('should not export files for p-frame with hideDataFromUi annotation', { timeout: 40000 },
tplTest.concurrent('should not export files for p-frame with hideDataFromUi annotation', { timeout: 40000 },
async ({ helper, expect, driverKit }) => {
const spec = { ...baseSpec, annotations: { 'pl7.app/hideDataFromUi': 'true' } };
const spec = { ...deepClone(baseSpec), annotations: { 'pl7.app/hideDataFromUi': 'true' } };
const fileHandle = await importFile(driverKit);

const result = await helper.renderTemplate(
Expand Down Expand Up @@ -87,3 +87,7 @@ async function importFile(driverKit: DriverKit) {

return ourFile.handle;
}

function deepClone<T>(obj: T): T {
return JSON.parse(JSON.stringify(obj));
}
16 changes: 10 additions & 6 deletions tests/workflow-tengo/src/pframes/test/xsv.export.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const baseSpec = {
partitionKeyLength: 2,
};

tplTest.for([
tplTest.concurrent.for([
{ partitionKeyLength: 0, storageFormat: 'Binary' },
{ partitionKeyLength: 1, storageFormat: 'Binary' },
{ partitionKeyLength: 2, storageFormat: 'Binary' },
Expand All @@ -88,7 +88,7 @@ tplTest.for([
// execution takes 1-2 seconds at most.
{ timeout: 30000 },
async ({ partitionKeyLength, storageFormat }, { helper, expect, driverKit }) => {
const spec = baseSpec;
const spec = deepClone(baseSpec);
spec.partitionKeyLength = partitionKeyLength;
spec.storageFormat = storageFormat;

Expand Down Expand Up @@ -129,7 +129,7 @@ tplTest.for([
},
);

tplTest.for([
tplTest.concurrent.for([
{ partitionKeyLength: 1, storageFormat: 'Binary' },
{ partitionKeyLength: 2, storageFormat: 'Binary' },
{ partitionKeyLength: 1, storageFormat: 'Json' },
Expand All @@ -144,7 +144,7 @@ tplTest.for([
// execution takes 1-2 seconds at most.
{ timeout: 30000 },
async ({ partitionKeyLength, storageFormat }, { helper, expect, driverKit }) => {
const spec = baseSpec;
const spec = deepClone(baseSpec);
spec.partitionKeyLength = partitionKeyLength;
spec.storageFormat = storageFormat;

Expand Down Expand Up @@ -198,7 +198,7 @@ function superPartitionKeys(keyLen: number): string[] {
return r;
}

tplTest.for([
tplTest.concurrent.for([
{
superPartitionKeyLength: 0,
partitionKeyLength: 0,
Expand Down Expand Up @@ -257,7 +257,7 @@ tplTest.for([
{ helper, expect, driverKit },
) => {
const supKeys = superPartitionKeys(superPartitionKeyLength).sort();
const spec = baseSpec;
const spec = deepClone(baseSpec);
spec.partitionKeyLength = partitionKeyLength;
spec.storageFormat = storageFormat;

Expand Down Expand Up @@ -308,3 +308,7 @@ tplTest.for([
if (superPartitionKeyLength === 0) expect(actual).toEqual(expected);
},
);

function deepClone<T>(obj: T): T {
return JSON.parse(JSON.stringify(obj));
}
16 changes: 10 additions & 6 deletions tests/workflow-tengo/src/pframes/test/xsv.import.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function partitionKeyJson(str: string): any {
return JSON.stringify(JSON.parse(str.replace('.index', '').replace('.values', '')));
}

tplTest.for([
tplTest.concurrent.for([
{ partitionKeyLength: 0, storageFormat: 'Binary' },
{ partitionKeyLength: 1, storageFormat: 'Binary' },
{ partitionKeyLength: 2, storageFormat: 'Binary' },
Expand All @@ -128,7 +128,7 @@ tplTest.for([
// execution takes 1-2 seconds at most.
{ timeout: 30000 },
async ({ partitionKeyLength, storageFormat }, { helper, expect, driverKit }) => {
const spec = baseSpec;
const spec = deepClone(baseSpec);
spec.partitionKeyLength = partitionKeyLength;
spec.storageFormat = storageFormat;
const expectedPKeys = [...expectedPartitionKeys(spec)].sort();
Expand Down Expand Up @@ -228,7 +228,7 @@ function superPartitionKeys(keyLen: number): string[] {
return r;
}

tplTest.for([
tplTest.concurrent.for([
{
superPartitionKeyLength: 0,
partitionKeyLength: 0,
Expand Down Expand Up @@ -284,7 +284,7 @@ tplTest.for([
{ timeout: 30000 },
async ({ superPartitionKeyLength, partitionKeyLength, storageFormat }, { helper, expect }) => {
const supKeys = superPartitionKeys(superPartitionKeyLength).sort();
const spec = baseSpec;
const spec = deepClone(baseSpec);
spec.partitionKeyLength = partitionKeyLength;
spec.storageFormat = storageFormat;
// inner keys
Expand Down Expand Up @@ -393,7 +393,7 @@ tplTest.for([
},
);

tplTest.for([
tplTest.concurrent.for([
{
superPartitionKeyLength: 0,
partitionKeyLength: 0,
Expand Down Expand Up @@ -449,7 +449,7 @@ tplTest.for([
{ timeout: 30000 },
async ({ superPartitionKeyLength, partitionKeyLength, storageFormat }, { helper, expect }) => {
const supKeys = superPartitionKeys(superPartitionKeyLength).sort();
const spec = baseSpec;
const spec = deepClone(baseSpec);
spec.partitionKeyLength = partitionKeyLength;
spec.storageFormat = storageFormat;
// inner keys
Expand Down Expand Up @@ -548,3 +548,7 @@ tplTest.for([
}
},
);

function deepClone<T>(obj: T): T {
return JSON.parse(JSON.stringify(obj));
}