Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Integration tests not working in Stash 2.11.3

Alexander Goncharenko March 12, 2014

I try to write integration tests for plugins I develop for Stash, but it seems they doesn't work in 2.11.3.

I created a plugin dummy using atlas-create-stash-plugin command to ensure that it is not my code causing troubles, but it doesn't work too.

When the Stash with integration tests launches, this message in console appears:

2014-03-13 16:07:52,871 WARN  [localhost-startStop-1]  c.a.plugin.manager.PluginEnabler Plugin 'mygroup.myartifact-tests' did not enable within 5 seconds.The plugin should not take this long to enable. Will only attempt to load plugin for another '25' seconds.

The complete log file can be found here: http://pastebin.com/udq2RVU3

I tried both atlas-run and atlas-integration-test commands with the same result. In the latter case it says that there are no tests in the test class, which is not surprising since the plugin containing tests won't start.

When I use atlas-run command and then navigate to Atlassian Plugin Test Console, I see this message:

It was said here that wired integration tests was broken in 2.5.0. Deleting atlassian-plugin.xml for tests as adviced did no good because Stash failed to load resources for it (obviously). I tried to run them with Stash 2.4.2 and it went smoothly, but this version is more than half a year old and it's not a good idea to run tests on 2.4.2 while developing plugins for 2.11.3+.

Is there any additional info on this issue? Any estimates on when it could be resolved? It seems like a major bug since we have to test our interoperability on production instances.

13 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Marcin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 2, 2015

This was an issue that has been fixed in AMPS (Atlassian Maven Plugin Suite) version 5.0.16 (https://ecosystem.atlassian.net/browse/AMPS-1214).  Currently the Atlassian Plugin SDK hasn't been updated to use a version of AMPS with the fix yet, however if you use atlas-create-stash-plugin you can just change the version of AMPS to 5.0.16 in there.  

There is also one additional fix required to ensure the integration tests run, you need to add the following to the Stash product config in pom.xml to ensure that the tests don't start running before Stash has finished launching:

<product>
	<id>stash</id>
	...
	<systemPropertyVariables>
	    <johnson.spring.lifecycle.synchronousStartup>true</johnson.spring.lifecycle.synchronousStartup>
	</systemPropertyVariables>
</product>

There has been an issue raised to fix this in the SDK as well for new plugins (https://ecosystem.atlassian.net/browse/AMPS-1228), but for now you can just add that config above manually.

0 votes
David Hodges August 6, 2014

Sorry I've been busy with other work for the last week. I checked and my pre-receive file was executable. I created a new repository like you suggested, just in case. It made no difference.

The constructor is called (and the plugin shows up in the list of plugins) but onReceive is not.

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 10, 2014

Hi David,

I'm afraid I'm out of ideas. If you're still testing your own plugin I would definitely like to see a copy of it, just because the smallest things might causing a problem.

Some other random questions/tips in desperation.

1. Are branch permissions working on the repository? eg. If you restrict the branch permissions are they enforced?

2. What interfaces does your class implement?

3. What does the atlassian-plugin.xml contain around your hook?

4. Just to confirm - you're enabled your repository hook?

5. Try running a clean version of Stash

Sorry I can't give you anything more concrete.

Cheers,

Charles

0 votes
David Hodges July 29, 2014

I tried the example plugin with Stash 3.1.3 and got the same result as with Stash 2.2.0 - the constructor is called but onReceive() is not.

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2014

Hi David,

So I've fired up a clean copy of that plugin locally and tried running it on Stash 3.1.3. It wasn't working for me either, but I noticed that the pre-receive (and post-recieve) hooks weren't executable:

https://confluence.atlassian.com/display/STASHKB/Repository+is+not+updated+by+pushing+content+immediately+after+its+creation

There was a previous bug in older versions of Stash which left the rep_1 repository without executable hooks. In any case maybe check that target/stash/home/data/repositories/REPO_ID/hooks/ contains pre-receive/post-receive files that are executable. Also see what happens to newly created repositories.

Cheers,

Charles

0 votes
David Hodges July 29, 2014

At Tru-Test we want to prevent commits to our master branch. It should only be updated by merging a pull request in Stash.

The example plugin should do exactly what I want. I only tried to create my own plugin because I couldn't get the example plugin to work. Should the example plugin work with more recent versions of Stash ?

0 votes
David Hodges July 28, 2014

So I downloaded https://bitbucket.org/atlassian/stash-example-hook-protect-ref(which should do exactly what I want), changed the amps.version in the pom.xml to match my amps version:

<amps.version>5.0.3</amps.version>

and compiled and ran with Java 1.7
(with Java 1.8 it throws an IllegalArgumentException in the spring classloader code).
It runs with no errors but adding logging to the constructor and onReceive methods shows that the constructor is called on start up (as expected) but onReceive is never called when I do a modify commit. Why is that ?
could it be related to this message ?
2014-07-29 14:43:11,378 DEBUG [localhost-startStop-1] c.a.s.i.h.HookExternalProcessConfigurer Not configuring hooks for '/usr/bin/git add -A --' because it's not being executed in a repository directory (/home/david/atlassian/atlassian-
stash-example-hook-protect-ref-bdc40acd9a6d/target/stash/home/tmp/git/perl-validation612778513130787830dir)
Entire log file (showing the commit as well as startup) is as follows:
2014-07-29 14:42:38,801 INFO [localhost-startStop-1] c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /home/david/atlassian/atlassian-stash-example-hook-protect-ref-bdc40acd9a6d/target/stash/home for 31709@david-VirtualBox
2014-07-29 14:42:39,447 WARN [localhost-startStop-1] com.jolbox.bonecp.BoneCPConfig JDBC password not set in driver properties, copying it from pool config
2014-07-29 14:42:57,827 INFO [localhost-startStop-1] com.atlassian.stash Switching to log level [DEBUG]
2014-07-29 14:42:57,841 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.throttle.SemaphoreThrottleService instance as an eventlistener
2014-07-29 14:42:57,843 DEBUG [localhost-startStop-1] c.a.s.i.t.SemaphoreThrottleService Configured resource [scm-hosting] with 2 tickets and an acquire timeout of 300 s
2014-07-29 14:42:57,845 DEBUG [localhost-startStop-1] c.a.s.i.t.SemaphoreThrottleService Configured resource [scm-command] with 25 tickets and an acquire timeout of 2 s
2014-07-29 14:42:57,879 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.scm.PluginScmService instance as an eventlistener
2014-07-29 14:42:58,379 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.plugin.webresource.PluginResourceLocatorImpl instance as an eventlistener
2014-07-29 14:42:58,769 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.notification.pullrequest.PullRequestNotificationProducer instance as an eventlistener
2014-07-29 14:42:58,915 INFO [localhost-startStop-1] c.a.s.i.hook.DefaultHookService Hook callback socket listening on 127.0.0.1:49315
2014-07-29 14:42:59,108 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.hook.repository.AsyncPostReceiveRepositoryHookAdapter instance as an eventlistener
2014-07-29 14:42:59,160 INFO [localhost-startStop-1] c.a.s.i.server.ApplicationInfoLogger Starting Stash 2.2.0 (7681d72e16 built on Mon Feb 25 20:54:32 NZDT 2013)
2014-07-29 14:42:59,161 INFO [localhost-startStop-1] c.a.s.i.server.ApplicationInfoLogger JVM: Oracle Corporation Java HotSpot(TM) Client VM 1.7.0_60-b19
2014-07-29 14:42:59,185 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.idx.DbChangesetIndex instance as an eventlistener
2014-07-29 14:42:59,227 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.idx.RepositorySnapshotServiceImpl instance as an eventlistener
2014-07-29 14:42:59,239 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.idx.ChangesetIndexingServiceImpl instance as an eventlistener
2014-07-29 14:42:59,248 DEBUG [localhost-startStop-1] c.a.s.i.i.ChangesetIndexingScheduler Starting changeset indexing threadpool with a maximum of 2 threads.
2014-07-29 14:42:59,250 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.idx.ChangesetIndexingScheduler instance as an eventlistener
2014-07-29 14:42:59,266 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.repository.RepositoryMetadataServiceImpl instance as an eventlistener
2014-07-29 14:42:59,308 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.auth.trusted.CorruptedAppLinkRemover instance as an eventlistener
2014-07-29 14:42:59,312 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper instance as an eventlistener
2014-07-29 14:42:59,543 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.pull.PullRequestRescopeListener instance as an eventlistener
2014-07-29 14:42:59,572 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.user.RecentlyAccessedRepositoriesServiceImpl instance as an eventlistener
2014-07-29 14:42:59,728 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.mail.MailServiceImpl instance as an eventlistener
2014-07-29 14:42:59,752 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.user.DefaultUserAdminService instance as an eventlistener
2014-07-29 14:42:59,781 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.mail.BotocssStylesResolverImpl instance as an eventlistener
2014-07-29 14:42:59,798 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.johnson.event.JohnsonEventListener instance as an eventlistener
2014-07-29 14:42:59,820 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.plugin.servlet.DefaultServletModuleManager instance as an eventlistener
2014-07-29 14:43:01,201 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-web-plugin:recent-repositories-menu-resources:/static/layout/base/menu/repositories/recent.soy' explicitly defined, skipping
2014-07-29 14:43:01,233 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-web-plugin:project-avatar-picker:/static/feature/project/project-avatar-picker/project-avatar-picker-ie8.less' explicitly defined, skipping
2014-07-29 14:43:01,249 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-web-plugin:dialog-message:/static/widget/dialog-message/dialog-message-ie8.less' explicitly defined, skipping
2014-07-29 14:43:01,265 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-web-plugin:select2:/static/lib/select2/select2-override.js' explicitly defined, skipping
2014-07-29 14:43:01,265 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-web-plugin:select2:/static/lib/select2/select2.js' explicitly defined, skipping
2014-07-29 14:43:02,961 WARN [Spring executor 6] o.s.beans.TypeConverterDelegate PropertyEditor [com.sun.beans.editors.EnumEditor] found through deprecated global PropertyEditorManager fallback - consider using a more isolated form of registration, e.g. on the BeanWrapper/BeanFactory!
2014-07-29 14:43:04,694 DEBUG [Spring executor 5] c.a.s.i.s.git.DefaultGitBinaryHelper Searching PATH for git executable
2014-07-29 14:43:04,813 DEBUG [Spring executor 5] c.a.s.i.h.HookExternalProcessConfigurer Not configuring hooks for '/usr/bin/git version' because it's not being executed in a repository directory (null)
2014-07-29 14:43:04,921 DEBUG [Spring executor 5] com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git version
2014-07-29 14:43:04,922 DEBUG [Spring executor 5] c.a.s.i.s.git.DefaultGitBinaryHelper Found git version 1.8.3.2 at /usr/bin/git
2014-07-29 14:43:04,924 DEBUG [Spring executor 5] c.a.s.i.scm.git.DefaultGitScmConfig git executable has been set to /usr/bin/git (1.8.3.2)
2014-07-29 14:43:04,924 DEBUG [Spring executor 5] c.a.s.i.scm.git.DefaultGitScmConfig libexec has not been configured; core commands will not be available
2014-07-29 14:43:07,317 INFO [Spring executor 11] c.a.stash.ssh.server.SshServer Starting SSH server on port 7999...
2014-07-29 14:43:07,353 INFO [Spring executor 11] c.a.stash.ssh.server.SshServer Started SSH server successfully.
2014-07-29 14:43:08,427 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.plugins.shortcuts.internal.DefaultKeyboardShortcutManager instance as an eventlistener
2014-07-29 14:43:08,468 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.ssh.service.SshKeyServiceImpl instance as an eventlistener
2014-07-29 14:43:08,484 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.ao.ActiveObjectsInitializer instance as an eventlistener
2014-07-29 14:43:08,486 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.hooks.permissions.internal.BranchPermissionServiceImpl instance as an eventlistener
2014-07-29 14:43:08,639 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.build.hook.RequiredBuildsHelper instance as an eventlistener
2014-07-29 14:43:08,695 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.plugin.hooks.requiredApprovers.RequiredApproversHelper instance as an eventlistener
2014-07-29 14:43:08,703 DEBUG [localhost-startStop-1] c.a.s.i.jira.idx.JiraKeyIndexer Using default JIRA key pattern: ((?<!([A-Z]{1,10})-?)[A-Z]+-\d+)
2014-07-29 14:43:08,709 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-jira-integration:jira-icons:/icons/icon-jira.svg' explicitly defined, skipping
2014-07-29 14:43:08,710 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-jira-integration:jira-icons:/icons/icons-ie8.less' explicitly defined, skipping
2014-07-29 14:43:08,728 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-notification:notification-email-styles:/email/images/icon-pr-arrow.png' explicitly defined, skipping
2014-07-29 14:43:08,728 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-notification:notification-email-styles:/email/images/logo-email-footer.png' explicitly defined, skipping
2014-07-29 14:43:08,728 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-notification:notification-email-styles:/email/pull-request.css' explicitly defined, skipping
2014-07-29 14:43:08,728 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-notification:notification-email-styles:/email/images/icon-file.png' explicitly defined, skipping
2014-07-29 14:43:08,728 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-notification:notification-email-styles:/email/aui-copy.css' explicitly defined, skipping
2014-07-29 14:43:08,728 DEBUG [localhost-startStop-1] c.a.s.i.p.WebResourceGenerationHelper Web resource 'com.atlassian.stash.stash-notification:notification-email-styles:/email/images/primary-button-slice.png' explicitly defined, skipping
2014-07-29 14:43:08,764 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.stash.internal.scm.git.upgrade.ConfigReflogExpiryTask instance as an eventlistener
2014-07-29 14:43:11,290 DEBUG [localhost-startStop-1] c.a.s.i.event.EventListenerRegistrar Registering com.atlassian.livereload.LiveReloadEventHandler instance as an eventlistener
2014-07-29 14:43:11,351 INFO [localhost-startStop-1] c.a.s.r.hook.ref.ProtectRefHook created com.atlassian.stash.repository.hook.ref.ProtectRefHook: com.atlassian.stash.internal.repository.RepositoryMetadataServiceImpl@f00984
2014-07-29 14:43:11,368 DEBUG [localhost-startStop-1] c.a.s.internal.scm.PluginScmService Cache miss for SCM git; searching plugins
2014-07-29 14:43:11,371 DEBUG [localhost-startStop-1] c.a.s.i.h.HookExternalProcessConfigurer Not configuring hooks for '/usr/bin/git init /home/david/atlassian/atlassian-stash-example-hook-protect-ref-bdc40acd9a6d/target/stash/home/tmp/git/perl-validation612778513130787830dir' because it's not being executed in a repository directory (null)
2014-07-29 14:43:11,377 DEBUG [ExtProcess - IO Pump:thread-4] c.a.s.i.scm.git.GenericGitCommand /usr/bin/git init /home/david/atlassian/atlassian-stash-example-hook-protect-ref-bdc40acd9a6d/target/stash/home/tmp/git/perl-validation612778513130787830dir: Completed with the following output:
Initialized empty Git repository in /home/david/atlassian/atlassian-stash-example-hook-protect-ref-bdc40acd9a6d/target/stash/home/tmp/git/perl-validation612778513130787830dir/.git/
2014-07-29 14:43:11,377 DEBUG [localhost-startStop-1] com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git init /home/david/atlassian/atlassian-stash-example-hook-protect-ref-bdc40acd9a6d/target/stash/home/tmp/git/perl-validation612778513130787830dir
2014-07-29 14:43:11,378 DEBUG [localhost-startStop-1] c.a.s.i.h.HookExternalProcessConfigurer Not configuring hooks for '/usr/bin/git add -A --' because it's not being executed in a repository directory (/home/david/atlassian/atlassian-stash-example-hook-protect-ref-bdc40acd9a6d/target/stash/home/tmp/git/perl-validation612778513130787830dir)
2014-07-29 14:43:11,383 DEBUG [localhost-startStop-1] com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git add -A --
2014-07-29 14:43:11,384 DEBUG [localhost-startStop-1] c.a.s.i.h.HookExternalProcessConfigurer Not configuring hooks for '/usr/bin/git commit -m Initial' because it's not being executed in a repository directory (/home/david/atlassian/atlassian-stash-example-hook-protect-ref-bdc40acd9a6d/target/stash/home/tmp/git/perl-validation612778513130787830dir)
2014-07-29 14:43:11,389 DEBUG [ExtProcess - IO Pump:thread-8] c.a.s.i.scm.git.GenericGitCommand /usr/bin/git commit -m Initial: Completed with the following output:
[master (root-commit) 3bfcb4a] Initial
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 temp
2014-07-29 14:43:11,389 DEBUG [localhost-startStop-1] com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git commit -m Initial
2014-07-29 14:43:11,411 INFO [localhost-startStop-1] c.a.s.internal.scm.PluginScmService Stash is using /usr/bin/git version 1.8.3.2
2014-07-29 14:43:13,497 DEBUG [http-bio-7990-exec-3] 883x2x1 127.0.0.1 "GET /scm/project_1/rep_1.git/info/refs HTTP/1.1" c.a.s.i.user.DefaultUserService Authenticating user admin
2014-07-29 14:43:23,672 DEBUG [http-bio-7990-exec-5] 883x3x1 127.0.0.1 "GET /scm/project_1/rep_1.git/info/refs HTTP/1.1" c.a.s.i.user.DefaultUserService Authenticating user admin
2014-07-29 14:43:23,882 DEBUG [http-bio-7990-exec-5] admin 883x3x1 100156m 127.0.0.1 "GET /scm/project_1/rep_1.git/info/refs HTTP/1.1" com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git http-backend
2014-07-29 14:44:22,726 DEBUG [http-bio-7990-exec-8] 884x5x1 127.0.0.1 "GET /scm/project_1/rep_1.git/info/refs HTTP/1.1" c.a.s.i.user.DefaultUserService Authenticating user admin
2014-07-29 14:44:24,681 DEBUG [http-bio-7990-exec-10] 884x6x1 127.0.0.1 "GET /scm/project_1/rep_1.git/info/refs HTTP/1.1" c.a.s.i.user.DefaultUserService Authenticating user admin
2014-07-29 14:44:24,821 DEBUG [http-bio-7990-exec-10] admin 884x6x1 ap3xeo 127.0.0.1 "GET /scm/project_1/rep_1.git/info/refs HTTP/1.1" com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git http-backend
2014-07-29 14:44:24,841 DEBUG [http-bio-7990-exec-2] 884x7x1 127.0.0.1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" c.a.s.i.user.DefaultUserService Authenticating user admin
2014-07-29 14:44:25,104 DEBUG [http-bio-7990-exec-2] admin 884x7x1 kbjzbi 127.0.0.1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git http-backend
2014-07-29 14:44:25,108 DEBUG [pool-4-thread-1] admin 884x7x1 kbjzbi 127.0.0.1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" c.a.s.i.i.ChangesetIndexingServiceImpl Request for indexing of rep_1 received
2014-07-29 14:44:25,121 DEBUG [pool-4-thread-1] admin 884x7x1 kbjzbi 127.0.0.1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" c.a.s.i.i.ChangesetIndexingServiceImpl [PROJECT_1/rep_1] Starting indexing with indexers [com.atlassian.stash.JiraKeyIndexer]
2014-07-29 14:44:25,217 DEBUG [pool-4-thread-1] admin 884x7x1 kbjzbi 127.0.0.1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git for-each-ref --format=%(refname)|%(objectname)|%(*objectname) refs/heads/ refs/tags/
2014-07-29 14:44:25,260 DEBUG [pool-4-thread-1] admin 884x7x1 kbjzbi 127.0.0.1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" c.a.s.i.jira.idx.JiraKeyIndexer Indexed e4151d868c9d615938d6e21de01edd2e461656fb (matching JIRA keys: [])
2014-07-29 14:44:25,261 DEBUG [pool-4-thread-1] admin 884x7x1 kbjzbi 127.0.0.1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git rev-list --format=%H%x02%h%x02%P%x02%p%x02%an%x02%ae%x02%at%n%B%n%x03 --ignore-missing --stdin --
2014-07-29 14:44:25,261 DEBUG [pool-4-thread-1] admin 884x7x1 kbjzbi 127.0.0.1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" c.a.s.i.i.ChangesetIndexingServiceImpl [PROJECT_1/rep_1] Scanning for deleted changesets...
2014-07-29 14:44:25,371 DEBUG [pool-4-thread-1] admin 884x7x1 kbjzbi 127.0.0.1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" com.atlassian.stash.scm.BaseCommand Executed /usr/bin/git rev-list --format=%H%x02%h%x02%P%x02%p%x02%an%x02%ae%x02%at%n%B%n%x03 --ignore-missing --stdin --
2014-07-29 14:44:25,392 DEBUG [pool-4-thread-1] admin 884x7x1 kbjzbi 127.0.0.1 "POST /scm/project_1/rep_1.git/git-receive-pack HTTP/1.1" c.a.s.i.i.ChangesetIndexingServiceImpl [PROJECT_1/rep_1] Indexed 1 changesets
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2014

Hi David,

Thanks for the logs.

The second plugin is a red-herring. It's a completely different plugin, and running on an ancient version of Stash (2.2.0). The most important thing to work out is why your actual plugin isn't starting.

Can you possibly make a copy of your plugin available (or just a sample that exhibits the same behaviour) so someone can test it locally? Unfortunately the logs aren't really telling us much. Normally there would be an exception/reason in the logs to explain why it isn't starting.

Cheers,

Charles

0 votes
David Hodges July 28, 2014

I created my plugin using atlas-create-stash-plugin with JDK 1.8.0_05 on Linux Mint 16 Petra and am running stash on the same box.

Stash report:

Stash 3.1.3 (3001003) / Atlassian SDK 5.0.3 / FastDev 2.4 / Dev Toolbox 2.0.12
0 votes
David Hodges July 28, 2014

I have installed the latest UPM - 2.17.7 - and still have the same problem.

I made the constructor for my plugin class (com.trutest.PreCommitHook) log a message.

This is being logged, showing that the constructor is called, but the plugin still doesn't register.

Log file is as follows:

2014-07-29 11:56:00,612 WARN [pool-13-thread-1] admin 715x264x0 pourw8 127.0.0.1 "POST /rest/plugins/self-update/1.0/ HTTP/1.1" c.a.p.o.f.t.s.ScanDescriptorForHostClassesStage The plugin 'plugin.6724004688326892744.atlassian-universal-p

lugin-manager-plugin-2.17.7.jar' uses a package 'org.apache.commons.fileupload.servlet' that is also exported by the application. It is highly recommended that the plugin use its own packages.

2014-07-29 11:56:02,972 WARN [ThreadPoolAsyncTaskExecutor::Thread 17] admin 715x185x0 pourw8 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" n.s.e.config.CacheConfiguration Cache 'UpmPluginLicenseTokenCache' is set to eternal but also has TTI/TTL set. To avoid this warning, clean up the config removing conflicting values of eternal, TTI and TTL. Effective configuration for Cache 'UpmPluginLicenseTokenCache' will be eternal='true', timeToIdleSeconds='0', timeToLiveSeconds='0'.

2014-07-29 11:56:03,113 WARN [ThreadPoolAsyncTaskExecutor::Thread 17] admin 715x185x0 pourw8 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" n.s.e.config.CacheConfiguration Cache 'HostLicenseCache' is set to eternal but also has TTI/TTL set. To avoid this warning, clean up the config removing conflicting values of eternal, TTI and TTL. Effective configuration for Cache 'HostLicenseCache' will be eternal='true', timeToIdleSeconds='0', timeToLiveSeconds='0'.

2014-07-29 11:56:03,133 WARN [ThreadPoolAsyncTaskExecutor::Thread 17] admin 715x185x0 pourw8 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" n.s.e.config.CacheConfiguration Cache 'UpmRoleBasedMetadataCache' is set to eternal but also has TTI/TTL set. To avoid this warning, clean up the config removing conflicting values of eternal, TTI and TTL. Effective configuration for Cache 'UpmRoleBasedMetadataCache' will be eternal='true', timeToIdleSeconds='0', timeToLiveSeconds='0'.

2014-07-29 11:56:03,200 WARN [ThreadPoolAsyncTaskExecutor::Thread 17] admin 715x185x0 pourw8 127.0.0.1 "POST /rest/plugins/1.0/ HTTP/1.1" n.s.e.config.CacheConfiguration Cache 'UpmPluginLicenseCache' is set to eternal but also has TTI/TTL set. To avoid this warning, clean up the config removing conflicting values of eternal, TTI and TTL. Effective configuration for Cache 'UpmPluginLicenseCache' will be eternal='true', timeToIdleSeconds='0', timeToLiveSeconds='0'.

2014-07-29 11:56:06,644 WARN [pool-13-thread-1] admin 715x264x0 pourw8 127.0.0.1 "POST /rest/plugins/self-update/1.0/ HTTP/1.1" c.a.upm.selfupdate.UpdateController Installed UPM update

2014-07-29 11:56:35,781 WARN [http-bio-7990-exec-8] 716x648x5 pourw8 127.0.0.1 "GET /s/d41d8cd98f00b204e9800998ecf8427e-T/en_US/faa46f8/432/2.0.12/_/download/resources/com.atlassian.devrel.developer-toolbox-plugin:dt-toolbar/toolbar.js HTTP/1.1" c.a.p.w.WebResourceTransformation Web resource transformer baseURL not found for resource toolbar.js, skipping

2014-07-29 11:57:56,227 INFO [Timer-2] c.a.s.internal.ssh.server.SshServer Stopping SSH server...

2014-07-29 11:57:56,230 INFO [Timer-2] c.a.s.internal.ssh.server.SshServer Stopped SSH server successfully.

2014-07-29 11:57:56,623 INFO [localhost-startStop-2] c.a.s.internal.home.HomeLockAcquirer Releasing lock on /home/david/atlassian/precommithook/stash-commit-hook/target/stash/home

2014-07-29 11:57:56,625 INFO [localhost-startStop-2] c.a.s.i.server.BuildInfoLogger Stash 3.1.3 has shut down

2014-07-29 11:58:34,323 INFO [localhost-startStop-1] c.a.s.i.server.BuildInfoLogger Starting Stash 3.1.3 (faa46f8 built on Wed Jul 09 01:29:27 NZST 2014)

2014-07-29 11:58:34,328 INFO [localhost-startStop-1] c.a.s.i.server.BuildInfoLogger JVM: Oracle Corporation Java HotSpot(TM) Client VM 1.8.0_05-b13

2014-07-29 11:58:35,298 INFO [localhost-startStop-1] c.a.s.internal.home.HomeLockAcquirer Successfully acquired lock on home directory /home/david/atlassian/precommithook/stash-commit-hook/target/stash/home for 21765@david-VirtualBox

2014-07-29 11:58:36,628 WARN [localhost-startStop-1] com.jolbox.bonecp.BoneCPConfig JDBC password not set in driver properties, copying it from pool config

2014-07-29 11:58:48,164 INFO [localhost-startStop-1] com.atlassian.stash.internal.project Switching to log level [WARN]

2014-07-29 11:58:48,164 INFO [localhost-startStop-1] c.a.stash.internal.scm.git.command Switching to log level [WARN]

2014-07-29 11:58:50,672 INFO [localhost-startStop-1] c.a.s.i.hook.DefaultHookService Hook callback socket listening on 127.0.0.1:59232

2014-07-29 11:58:56,997 WARN [localhost-startStop-1] c.a.p.o.f.t.s.GenerateManifestStage The Spring Manifest header in jar 'pdkinstall-plugin-0.6.jar' isn't set for a 300 second timeout waiting for dependencies. Please add ';timeout:=300'

2014-07-29 11:58:59,418 WARN [ThreadPoolAsyncTaskExecutor::Thread 13] o.s.beans.TypeConverterDelegate PropertyEditor [com.sun.beans.editors.EnumEditor] found through deprecated global PropertyEditorManager fallback - consider using a more isolated form of registration, e.g. on the BeanWrapper/BeanFactory!

2014-07-29 11:59:01,124 WARN [ThreadPoolAsyncTaskExecutor::Thread 11] com.trutest.stash.PreCommitHook created com.trutest.stash.PreCommitHook:Stash

2014-07-29 11:59:02,181 INFO [ThreadPoolAsyncTaskExecutor::Thread 1] c.a.s.i.s.g.t.DefaultTranscodeServer Callback socket listening at 127.0.0.1:58021

2014-07-29 11:59:03,335 WARN [ThreadPoolAsyncTaskExecutor::Thread 14] n.s.e.config.CacheConfiguration Cache 'UpmPluginLicenseTokenCache' is set to eternal but also has TTI/TTL set. To avoid this warning, clean up the config removing conflicting values of eternal, TTI and TTL. Effective configuration for Cache 'UpmPluginLicenseTokenCache' will be eternal='true', timeToIdleSeconds='0', timeToLiveSeconds='0'.

2014-07-29 11:59:03,470 WARN [ThreadPoolAsyncTaskExecutor::Thread 12] n.s.e.config.CacheConfiguration Cache 'com.atlassian.applinks.core.DefaultReadOnlyApplicationLinkService.links' is set to eternal but also has TTI/TTL set. To avoid this warning, clean up the config removing conflicting values of eternal, TTI and TTL. Effective configuration for Cache 'com.atlassian.applinks.core.DefaultReadOnlyApplicationLinkService.links' will be eternal='true', timeToIdleSeconds='0', timeToLiveSeconds='0'.

2014-07-29 11:59:03,722 WARN [ThreadPoolAsyncTaskExecutor::Thread 14] n.s.e.config.CacheConfiguration Cache 'HostLicenseCache' is set to eternal but also has TTI/TTL set. To avoid this warning, clean up the config removing conflicting values of eternal, TTI and TTL. Effective configuration for Cache 'HostLicenseCache' will be eternal='true', timeToIdleSeconds='0', timeToLiveSeconds='0'.

2014-07-29 11:59:03,814 WARN [ThreadPoolAsyncTaskExecutor::Thread 14] n.s.e.config.CacheConfiguration Cache 'UpmRoleBasedMetadataCache' is set to eternal but also has TTI/TTL set. To avoid this warning, clean up the config removing conflicting values of eternal, TTI and TTL. Effective configuration for Cache 'UpmRoleBasedMetadataCache' will be eternal='true', timeToIdleSeconds='0', timeToLiveSeconds='0'.

2014-07-29 11:59:04,313 WARN [ThreadPoolAsyncTaskExecutor::Thread 14] n.s.e.config.CacheConfiguration Cache 'UpmPluginLicenseCache' is set to eternal but also has TTI/TTL set. To avoid this warning, clean up the config removing conflicting values of eternal, TTI and TTL. Effective configuration for Cache 'UpmPluginLicenseCache' will be eternal='true', timeToIdleSeconds='0', timeToLiveSeconds='0'.

2014-07-29 11:59:10,627 WARN [localhost-startStop-1] c.a.plugin.manager.PluginEnabler Plugin 'com.trutest.stash-commit-hook-tests' did not enable within 5 seconds.The plugin should not take this long to enable. Will only attempt to load plugin for another '25' seconds.

2014-07-29 11:59:31,633 WARN [active-objects-ddl-0] c.a.a.o.AOConfigurationServiceProviderImpl Timeout (30000 MILLISECONDS) waiting for ActiveObjectConfiguration for Bundle : com.atlassian.stash.stash-audit [70].

To avoid this warning add an ao configuration module to your plugin

2014-07-29 11:59:31,635 WARN [active-objects-ddl-0] c.a.a.o.AOConfigurationServiceProviderImpl Didn't find any configuration service for bundle com.atlassian.stash.stash-audit nor any entities scanning for default AO packages.

2014-07-29 11:59:31,637 WARN [ListenableFutureAdapter-thread-0] c.a.a.o.ActiveObjectsServiceFactory Resubmitting AO bundle with longer timeout 180000 ms for bundle : com.atlassian.stash.stash-audit [70]

2014-07-29 11:59:35,652 ERROR [localhost-startStop-1] c.a.plugin.manager.PluginEnabler Unable to start the following plugins due to timeout while waiting for plugin to enable: com.trutest.stash-commit-hook-tests

2014-07-29 11:59:36,440 WARN [localhost-startStop-1] c.a.s.i.p.OsgiBundledPathScanner Cannot scan directory /com/atlassian/oauth/shared/servlet/ in bundle com.atlassian.oauth.atlassian-oauth-service-provider-plugin as it does not exist

2014-07-29 11:59:40,355 INFO [localhost-startStop-1] c.a.s.internal.ssh.server.SshServer Starting SSH server on port 7999...

2014-07-29 11:59:40,451 INFO [localhost-startStop-1] c.a.s.internal.ssh.server.SshServer Started SSH server successfully.

0 votes
David Hodges July 28, 2014

I am using UPM v2.16.5.

The log file says

[INFO] [talledLocalContainer] 2014-07-29 11:22:37,437 WARN [localhost-startStop-1] c.a.plugin.manager.PluginEnabler Plugin 'com.trutest.stash-commit-hook-tests' did not enable within 5 seconds.The plugin should not take this long to enable. Will only attempt to load plugin for another '25' seconds.

and then

[INFO] [talledLocalContainer] 2014-07-29 11:23:02,464 ERROR [localhost-startStop-1] c.a.plugin.manager.PluginEnabler Unable to start the following plugins due to timeout while waiting for plugin to enable: com.trutest.stash-commit-hook-tests

despite me using the command atlas-run -e -X --jvmargs -Datlassian.plugins.enable.wait=300
which I would have expected to make it wait 300 seconds instead of 30.
0 votes
David Hodges July 27, 2014

I have the same problem and the bitbucket link for the workaround above no longer works. Where can I find a version of the osgi-testrunner plugin that will enable me to develop and test plugins for stash ?

Adding the following arguments to the atlas-run command line seems to have no effect:

--jvmargs -Datlassian.plugins.enable.wait=300

It still complains that my plugin is not started after 30 seconds, not 300.

cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 28, 2014

Hi David,

What errors are you seeing? Ignore the link above, the branch it was pointing to has been merged, and was released in 1.2.0.

https://bitbucket.org/atlassian/atlassian-plugins-osgi-testrunner-parent/commits/all

If you're seeing errors like Alexander it could be related to your UPM version:

https://answers.atlassian.com/questions/114252/not-found-404-com-atlassian-upm-api-util-option

Cheers,

Charles

0 votes
David Hodges July 27, 2014

I have the same problem and the bitbucket link for the workaround above no longer works. Where can I find a version of the osgi-testrunner plugin that will enable me to develop and test plugins for stash ?

Adding the following arguments to the atlas-run command line seems to have no effect:

--jvmargs -Datlassian.plugins.enable.wait=300

It still complains that my plugin is not started after 30 seconds, not 300.

0 votes
David Hodges July 27, 2014

I have the same problem and the bitbucket link for the workaround above no longer works. Where can I find a version of the osgi-testrunner plugin that will enable me to develop and test plugins for stash ?

Adding the following arguments to the atlas-run command line seems to have no effect:

--jvmargs -Datlassian.plugins.enable.wait=300

It still complains that my plugin is not started after 30 seconds, not 300.

0 votes
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 5, 2014

Hi guys,

Sorry for the delay. I'm looking to get a fix into the next version of the SDK.

For now if you build and install the osgi-testrunner plugin on this branch you should get everything to work. Please let me know if this isn't the case.

https://bitbucket.org/atlassian/atlassian-plugins-osgi-testrunner-parent/branch/bugfix%2FPTRUNNER-23-context-path-fixes

Charles

Alexander Goncharenko April 10, 2014

I tried version 1.2.0 of testrunner but unfortunately still unable to fix tests.

I'm getting an exception when my test is running: http://pastebin.com/qmpynNBw

The plugin was created usin command atlas-create-stash-plugin and was unchanged. I'm using Stash v.2.12.1 and Atlassian SDK v.4.2.20. You can find the full log output here: http://pastebin.com/MC3XF7Fh

Alexander Goncharenko April 10, 2014

Additional info.

It seems like things stopped working since version 1.1.5 of testrunner. While forcing Stash v2.4.2 for refapp plugin it only works with versions of testrunner prior to 1.1.5 where UpmOptionAdapter was introduced. Starting from this version it stops working with exception "java.lang.NoClassDefFoundError: com/atlassian/upm/api/util/Option".

So I can't check if fixes introduced in 1.2.0 solve the problem with integration tests.

0 votes
anil kumar March 15, 2014

I'm also getting the same problem. ow to solve this.. I struck here. any help.

Even I raised a thread for this see below one please.

https://answers.atlassian.com/questions/272762/merge-check-plugin-problem

Thanks in advance

Anil

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events