Community
Participate
Working Groups
We have currently a few helpers that help us run operations that might be run as tasks, however we have to user different operations depending on if we expect the task to fail or succeed. We also have some custom walkaround in tests to handle some special situations. I think we should create a handler that would be a used as a proxy for all git operations that would be smart enough to handle tasks and do some basic asserts. We have a handler like this on UI and it works fine so we can do something analogical in tests.
A better fix to bug 369034 would be delaying subsequent commits in all tests but only when required rather than adding Thread.sleep() on demand. That would require the helper to remember the time of the last commit so the next one isn't created too early.
(In reply to comment #0) I can think of at least 3 approaches here: 1. Since what flies between the server and the test framework are JSON objects I would encapsulate them in objects like TestFile, TestFolder, TestClone and so on. The next step would be to add some convenience methods which are now gathered as statics in GitTest.java. A test could look like this then: TestClone tc = TestClone.create("ssh://..."); TestFile tf = tc.getProject().getFile("folder/test.txt"); tf.setContents("hello"); tf.add().commit("commit"); assertEquals(1, tc.log().size()); 2. Replace the current implementation of JGit commands, so they call our REST API. Writing an Orion Git test would be the same as JGit test. 3. Allow to code tests with a bash-like notation: "clone 'ssh...'; echo 'hello' > folder/test.txt; add folder/test.txt;commit -m 'commit'". See bug 365444 for a similar enhancement request in JGit.
Who is going to look at it?
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html