Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo: fix some typo #2941

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tanpenggood
Copy link
Contributor

No description provided.

@hazendaz
Copy link
Member

@tanpenggood Seems ok but its causing 8 of our builds plus coveralls to fail. Please make sure to rebase against our current master then double check your work.

@tanpenggood
Copy link
Contributor Author

@tanpenggood Seems ok but its causing 8 of our builds plus coveralls to fail. Please make sure to rebase against our current master then double check your work.

yeah, the main reason is that ScriptRunnerTest#testLoggingFullScipt failed to run.

Firstly, I pulled the latest code from the master branch.
Then, I used openjdk 17 to execute the method, but the test still failed.

It's expected:

select userid from account where userid = 'j2ee';

USERID	
j2ee	

and it's auctal:

select userid from account where userid = 'j2ee';


I don't quite understand its expected value, why add the code("USERID\t" + LINE_SEPARATOR + "j2ee\t" + LINE_SEPARATOR) ?

@hazendaz Could you kindly please tell me the reason why he did this?
and what should I do to pass this test case?

@Test
void testLoggingFullScipt() throws Exception {
DataSource ds = createUnpooledDataSource(JPETSTORE_PROPERTIES);
try (Connection conn = ds.getConnection()) {
ScriptRunner runner = new ScriptRunner(conn);
runner.setAutoCommit(true);
runner.setStopOnError(false);
runner.setErrorLogWriter(null);
runner.setSendFullScript(true);
StringWriter sw = new StringWriter();
PrintWriter logWriter = new PrintWriter(sw);
runner.setLogWriter(logWriter);
Reader reader = new StringReader("select userid from account where userid = 'j2ee';");
runner.runScript(reader);
assertEquals("select userid from account where userid = 'j2ee';" + LINE_SEPARATOR + LINE_SEPARATOR + "USERID\t"
+ LINE_SEPARATOR + "j2ee\t" + LINE_SEPARATOR, sw.toString());
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants