Skip to content

Commit 41edc61

Browse files
committed
ci(node-server-sdk): put in contract test workaround
1 parent 14fc100 commit 41edc61

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

contract-tests/src/sdkClientEntity.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,22 @@ export async function newSdkClientEntity(options: any): Promise<SdkClientEntity>
328328
options.configuration.startWaitTimeMs !== undefined
329329
? options.configuration.startWaitTimeMs
330330
: 5000;
331+
332+
333+
// TODO: synchronizer should be a list, but for this is a temporary workaround
334+
// so that we can pass the contract tests in a more reasonable manner.
335+
// SDK-1798
336+
const adaptedConfigs = {
337+
...options.configuration,
338+
};
339+
340+
adaptedConfigs.dataSystem.synchronizers = {
341+
primary: options.configuration.dataSystem.synchronizers?.[0],
342+
secondary: options.configuration.dataSystem.synchronizers?.[1],
343+
}
331344
const client: LDClient = ld.init(
332345
options.configuration.credential || 'unknown-sdk-key',
333-
makeSdkConfig(options.configuration, options.tag),
346+
makeSdkConfig(adaptedConfigs, options.tag),
334347
);
335348
try {
336349
await client.waitForInitialization({ timeout });

0 commit comments

Comments
 (0)