diff --git a/src/api/tests/suites/content.test.ts b/src/api/tests/suites/content.test.ts index 26708b3fc..a2df50d7a 100644 --- a/src/api/tests/suites/content.test.ts +++ b/src/api/tests/suites/content.test.ts @@ -236,7 +236,7 @@ describe('Content Tests', { concurrent: true }, () => { await connection.runSQL('select from qiws.qcustcdt'); expect.fail('Should have thrown an error'); } catch (e: any) { - expect(e.message).toBe('Token . was not valid. Valid tokens: , FROM INTO. (42601)'); + expect(e.message.endsWith(': , FROM INTO. (42601)')).toBeTruthy(); expect(e.sqlstate).toBe('42601'); } }); @@ -622,23 +622,26 @@ describe('Content Tests', { concurrent: true }, () => { const shortName = Tools.makeid(8); const createLib = await connection.runCommand({ command: `RUNSQL 'create schema "${longName}" for ${shortName}' commit(*none)`, noLibList: true }); if (createLib.code === 0) { - await connection.runCommand({ command: `CRTSRCPF FILE(${shortName}/SFILE) MBR(MBR) TEXT('Test long library name')` }); - - const libraries = await content.getLibraries({ library: `${shortName}` }); - expect(libraries?.length).toBe(1); + try { + await connection.runCommand({ command: `CRTSRCPF FILE(${shortName}/SFILE) MBR(MBR) TEXT('Test long library name')` }); - const objects = await content.getObjectList({ library: `${shortName}`, types: [`*SRCPF`], object: `SFILE` }); - expect(objects?.length).toBe(1); - expect(objects[0].type).toBe(`*FILE`); - expect(objects[0].text).toBe(`Test long library name`); + const libraries = await content.getLibraries({ library: `${shortName}` }); + expect(libraries?.length).toBe(1); - const memberCount = await content.countMembers({ library: `${shortName}`, name: `SFILE` }); - expect(memberCount).toBe(1); - const members = await content.getMemberList({ library: `${shortName}`, sourceFile: `SFILE` }); + const objects = await content.getObjectList({ library: `${shortName}`, types: [`*SRCPF`], object: `SFILE` }); + expect(objects?.length).toBe(1); + expect(objects[0].type).toBe(`*FILE`); + expect(objects[0].text).toBe(`Test long library name`); - expect(members?.length).toBe(1); + const memberCount = await content.countMembers({ library: `${shortName}`, name: `SFILE` }); + expect(memberCount).toBe(1); + const members = await content.getMemberList({ library: `${shortName}`, sourceFile: `SFILE` }); - await connection.runCommand({ command: `RUNSQL 'drop schema "${longName}"' commit(*none)`, noLibList: true }); + expect(members?.length).toBe(1); + } + finally { + await connection.runCommand({ command: `RUNSQL 'drop schema "${longName}"' commit(*none)`, noLibList: true }); + } } else { throw new Error(`Failed to create schema "${longName}"`); } @@ -737,7 +740,7 @@ describe('Content Tests', { concurrent: true }, () => { await connection.sendCommand({ command: `${connection.remoteFeatures.attr} ${directory}/${ccsid37File} CCSID=37` }); await checkFile(`${directory}/${ccsid37File}`, 37); const files = [`${directory}/${unicodeFile}`, `${directory}/${ccsid37File}`]; - + expect((await connection.sendCommand({ command: `mkdir ${directory}/copy` })).code).toBe(0); expect((await content.copy(files, `${directory}/copy`)).code).toBe(0); expect(await content.testStreamFile(`${directory}/${unicodeFile}`, "f")).toBe(true); diff --git a/src/instantiate.ts b/src/instantiate.ts index d21254abc..30b501419 100644 --- a/src/instantiate.ts +++ b/src/instantiate.ts @@ -97,6 +97,10 @@ export async function loadAllofExtension(context: vscode.ExtensionContext) { // Register git events based on workspace folders if (vscode.workspace.workspaceFolders) { setupGitEventHandler(context); + const MINIMUM_SCROLLBACK = 10000; + if(vscode.workspace.getConfiguration().get('terminal.integrated.scrollback') < MINIMUM_SCROLLBACK){ + vscode.workspace.getConfiguration().update('terminal.integrated.scrollback', MINIMUM_SCROLLBACK, vscode.ConfigurationTarget.Workspace); + } } }