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

fix filename used in ConcurrencySigTest #195

Merged
merged 2 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
Expand All @@ -40,8 +37,6 @@ public class ConcurrencySigTest extends SigTestEE {

private static final TestLogger log = TestLogger.get(ConcurrencySigTest.class);

private static final String SIG_FILE_VER_SEP = "_";

public ConcurrencySigTest() {
setup();
}
Expand Down Expand Up @@ -135,12 +130,12 @@ protected File writeStreamToTempFile(InputStream inputStream, String tempFilePre
}
}

protected File writeStreamToSigFile(InputStream inputStream, String packageVersion) throws IOException {
protected File writeStreamToSigFile(InputStream inputStream) throws IOException {
FileOutputStream outputStream = null;
String tmpdir = System.getProperty("java.io.tmpdir");
try {
File sigfile = new File(
tmpdir + File.separator + SignatureTests.SIG_FILE_NAME + SIG_FILE_VER_SEP + packageVersion);
tmpdir + File.separator + SignatureTests.SIG_FILE_NAME);
if (sigfile.exists()) {
sigfile.delete();
log.info("Existing signature file deleted to create new one");
Expand Down Expand Up @@ -206,13 +201,10 @@ public void signatureTest() throws Fault {
log.info("packageFile location is :" + packageListFile);

mapFileAsProps = getSigTestDriver().loadMapFile(mapFile);
String packageVersion = mapFileAsProps.getProperty("jakarta.enterprise.concurrent");
log.info("Package version from mapfile :" + packageVersion);

InputStream inStreamSigFile = ConcurrencySigTest.class.getClassLoader()
.getResourceAsStream("ee/jakarta/tck/concurrent/spec/signature/" + SignatureTests.SIG_FILE_NAME
+ SIG_FILE_VER_SEP + packageVersion);
File sigFile = writeStreamToSigFile(inStreamSigFile, packageVersion);
.getResourceAsStream("ee/jakarta/tck/concurrent/spec/signature/" + SignatureTests.SIG_FILE_NAME);
File sigFile = writeStreamToSigFile(inStreamSigFile);
log.info("signature File location is :" + sigFile.getCanonicalPath());
signatureRepositoryDir = System.getProperty("java.io.tmpdir");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

public class SignatureTests extends TestClient {

public static final String SIG_FILE_NAME = "jakarta.enterprise.concurrent.sig_3.0.0";
public static final String SIG_FILE_NAME = "jakarta.enterprise.concurrent.sig";
public static final String SIG_MAP_NAME = "sig-test.map";
public static final String SIG_PKG_NAME = "sig-test-pkg-list.txt";

Expand Down