Some tests generate failures due to trailing space
- Dominant language
- Java
- Stars
- 276
- Forks
- 223
- PR merge metrics
- No merged PRs in 30d
Description
The following tests generated failures:
TEST-com.sforce.ws.codegen.SObjectCodeGeneratorTest.xml
TEST-com.sforce.ws.codegen.ConnectorCodeGeneratorTest.xml
TEST-com.sforce.ws.codegen.AggregateCodeGeneratorTest.xml
Version: 61.1.0 - I have the tag checked out
Environment: Windows 10
Java version: openjdk-22 and the corretto-1.8 version of the Java 1.8 JDK.
Issue:
The issue I ran into was that tests would fail when running "mvn clean package" with a similar result to the example I will paste below:
```
but was:<...rce.soap.enterprise;[ import com.sforce.ws.ConnectorConfig; import com.sforce.ws.ConnectionException; /** * This is a generated class for the SObject Enterprise API. * Do not edit this file, as your changes will be lost. */ public class Connector { public static final String END_POINT = "https://login.salesforce.com/services/Soap/c/16.0"; public static EnterpriseConnection newConnection(String username, String password) throws ConnectionException { ConnectorConfig config = new ConnectorConfig(); config.setUsername(username); config.setPassword(password); return newConnection(config); } public static EnterpriseConnection newConnection(ConnectorConfig config) throws ConnectionException { if (config.getAuthEndpoint() == null) { config.setAuthEndpoint(END_POINT); } if (config.getServiceEndpoint() == null) { config.setServiceEndpoint(END_POINT); } return new EnterpriseConnection(config); } }] >" type="junit.framework.ComparisonFailure">
```
Text was copied directly from output - I will put a formatted version below:
```
but was:
<...rce.soap.enterprise;[ import com.sforce.ws.ConnectorConfig; import com.sforce.ws.ConnectionException; /** * This is a generated class for the SObject Enterprise API. * Do not edit this file, as your changes will be lost. */ public class Connector { public static final String END_POINT = "https://login.salesforce.com/services/Soap/c/16.0"; public static EnterpriseConnection newConnection(String username, String password) throws ConnectionException { ConnectorConfig config = new ConnectorConfig(); config.setUsername(username); config.setPassword(password); return newConnection(config); } public static EnterpriseConnection newConnection(ConnectorConfig config) throws ConnectionException { if (config.getAuthEndpoint() == null) { config.setAuthEndpoint(END_POINT); } if (config.getServiceEndpoint() == null) { config.setServiceEndpoint(END_POINT); } return new EnterpriseConnection(config); } }] >" type="junit.framework.ComparisonFailure">
```
Youll notice the expected/observed output is the same except for the very end in the bracketing. It appears to be related to a missing space following the closing } of the generated code.
Expected: ...} } ] >
Recieved: ...} }] >
This generates what is essentially an ignorable test failure, but should be resolved so the provided instructions to perform a "mvn clean package" generate a successful result with no errors.
I may be able to make a PR relating to this, but no promises on the time frame I can get to it
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.