git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [JGIT PATCH 3/4] Added test for RefUpdate branch deletion

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Aug 22, 2008, 23:28 UTC
Message-ID
<200808230128.19035.robin.rosenberg.lists@dewire.com>
In-Reply-To
<1219445147-6801-4-git-send-email-charleso@charleso.org>
lördagen den 23 augusti 2008 00.45.46 skrev Charles O'Farrell:

Having unit tests is lovely and we appreciate that very much. We need more of this. Unfortunately it breaks. Is the fix the obvious one?

-- robin
> +	public void testDeleteHead() throws IOException {
> +		final RefUpdate ref = updateRef(Constants.HEAD);
> +		delete(ref, Result.NOT_ATTEMPTED, true, false);
junit.framework.AssertionFailedError: expected:<NOT_ATTEMPTED> but was:<REJECTED_CURRENT_BRANCH>
	at junit.framework.Assert.fail(Assert.java:47)
	at junit.framework.Assert.failNotEquals(Assert.java:280)
	at junit.framework.Assert.assertEquals(Assert.java:64)
	at junit.framework.Assert.assertEquals(Assert.java:71)
	at org.spearce.jgit.lib.RefUpdateTest.delete(RefUpdateTest.java:61)
	at org.spearce.jgit.lib.RefUpdateTest.testDeleteHead(RefUpdateTest.java:75)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:623)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 7 of 9 in “Branch deletion testing and bug fixes”
  1. 0/4 Branch deletion testing and bug fixesCharles O'Farrell, Aug 22, 2008
  2. 1/4 Ensured that RefUpdate cannot delete current branchCharles O'Farrell, Aug 22, 2008
  3. 2/4 Fixed bug where RefUpdate didn't delete identical HEAD branchCharles O'Farrell, Aug 22, 2008
  4. 3/4 Added test for RefUpdate branch deletionCharles O'Farrell, Aug 22, 2008
  5. 4/4 Added extra javadoc for delete to significant RefUpdate resultsCharles O'Farrell, Aug 22, 2008
  6. Shawn O. PearceAug 22, 2008
  7. Robin RosenbergAug 22, 2008
  8. Shawn O. PearceAug 22, 2008
  9. Shawn O. PearceAug 22, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.