Blocked: RESTWS-875: End Point: Concept attribute types delete test

Hello team, I am working on this ticket RESTWS-875. Which is meant to handle an End Point: Concept attribute types delete test. I think I have written the right method, but when I run the test I get this error ERROR - SqlExceptionHelper.logExceptions(146) |2021-12-22 18:07:43,134| Referent - Pastebin.com .

This is my method

 @Test
	public void shouldPurgeConceptAttributeType() throws Exception {
    	Assert.assertNotNull(service.getConceptAttributeTypeByUuid(getUuid()));
		MockHttpServletRequest req = request(RequestMethod.DELETE, getURI() + "/" + getUuid());
		req.addParameter("purge", "true");
		handle(req);
		Assert.assertNull(service.getConceptAttributeTypeByUuid(getUuid()));
	}

I also tried this and still throws the same error

 @Test
   public void shouldPurgeConceptAttributeType() throws Exception {
   	final String uuid = "9516cc50-6f9f-11e0-8414-001e378eb67e";
   	Assert.assertNotNull(service.getConceptAttributeTypeByUuid(uuid));
   	MockHttpServletRequest req = request(RequestMethod.DELETE, getURI() + "/" + uuid);
   	req.addParameter("purge", "true");
   	handle(req);
   	Assert.assertNull(service.getConceptAttributeTypeByUuid(uuid));
   }

However, I realised that the test fails at the assertNull(). If I comment it out and only leave the assertNotNull(), the test passes quite well, though leaving out the assertNull() would not align with the objective of the test.

I need your guidance because I am blocked.

cc @kdaud , @sharif, @dkayiwa, @ibacher @jonathan

@irenyak1 do you have your codes on github?

No @kdaud I hadn’t pushed the code to github. But I could make a PR and you look into it.

@kdaud I have made a PR here. Please you could look through the code. Thank you very much.

@irenyak1 have put a comment on github.

I attended to it @kdaud

@dkayiwa added a comment on github.

1 Like