| Summary: | [server][test] Add a better helper for git operations run as task | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Malgorzata Janczarska <malgorzata.tomczyk> |
| Component: | Git | Assignee: | Project Inbox <orion.git-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P4 | CC: | Szymon.Brandys, tomasz.zarna |
| Version: | 0.4 | Keywords: | test |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 342820 | ||
|
Description
Malgorzata Janczarska
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 |