Hi all
Thank you for the help on the first run, I have spent some more time
but I did not understand how some core part suppose to work, I have a
failing test that
do what suppose to do but with latest core does not fail
FreeStyleProject job = createSignApkJob();
SignApksBuilder builder = new SignApksBuilder();
builder.setKeyStoreId(KEY_STORE_ID);
builder.setKeyAlias(KEY_ALIAS);
builder.setApksToSign("**/*-unsigned.apk");
builder.setArchiveSignedApks(!builder.getArchiveSignedApks());
builder.setArchiveUnsignedApks(!builder.getArchiveUnsignedApks());
builder.setAndroidHome(androidHome.getRemote());
job.getBuildersList().add(builder);
Build build = testJenkins.buildAndAssertSuccess(job);
FilePath workspace = build.getWorkspace();
for (int i = 0; i < (FilePath.VALIDATE_ANT_FILE_MASK_BOUND + 1); i++) {
workspace.createTempFile(String.format("%06d", i), ".tmp");
}
SignApksBuilder.SignApksDescriptor desc =
(SignApksBuilder.SignApksDescriptor)
testJenkins.jenkins.getDescriptor(SignApksBuilder.class);
String jobUrl = job.getUrl();
String checkUrl = jobUrl + "/" + desc.getDescriptorUrl() +
"/checkApksToSign?value=" + URLEncoder.encode("**/*-unsigned.apk",
"utf-8");
HtmlPage page = testJenkins.createWebClient().goTo(checkUrl);
String pageText = page.getWebResponse().getContentAsString();
assertThat(pageText,
not(containsString(InterruptedException.class.getSimpleName())));
assertThat(pageText,
containsString(Messages.validation_globSearchLimitReached(FilePath.VALIDATE_ANT_FILE_MASK_BOUND)));
As far as I know what is doing is that create > 10000 files in the
folder and expect to rise a crash and assert it.
The exception should come from the formValidation
public FormValidation doCheckApksToSign(@AncestorInPath
AbstractProject project, @QueryParameter String value) throws
IOException {
if (project == null) {
return FormValidation.warning(Messages.validation_noProject());
}
project.checkPermission(Item.WORKSPACE);
FilePath someWorkspace = project.getSomeWorkspace();
if (someWorkspace == null) {
return
FormValidation.warning(Messages.validation_noWorkspace());
}
String[] globs = getSelectionGlobs(value);
String msg;
for (String glob : globs) {
try {
msg = someWorkspace.validateAntFileMask(value,
FilePath.VALIDATE_ANT_FILE_MASK_BOUND);
}
catch (InterruptedException e) {
msg =
Messages.validation_globSearchLimitReached(FilePath.VALIDATE_ANT_FILE_MASK_BOUND);
}
if (msg != null) {
return FormValidation.warning(msg);
}
}
return FormValidation.ok();
}
This never rise any exception
Michael
On Fri, Jul 5, 2024 at 10:11 PM Michael Nazzareno Trimarchi
<[email protected]> wrote:
>
> Hi all
>
> Can someone help on review this changes. I have seen that there is not CI set
> for this project but the plugin is broken for the new java requirements. I
> have created this pull request
>
> https://github.com/jenkinsci/android-signing-plugin/pull/5
>
> This should allow us to have it back again working
>
> Any help will be appreciated
>
> Michael
>
--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M. +39 347 913 2170
[email protected]
__________________________________
Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9172
[email protected]
www.amarulasolutions.com
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/CAOf5uw%3Dkkj5SghYWbgjO32D%2BMBjfR6ouPj%2Bc4VDk9VGxu-KQYg%40mail.gmail.com.