|
17 | 17 | package com.marklogic.client.functionaltest; |
18 | 18 |
|
19 | 19 | import static org.junit.Assert.assertEquals; |
| 20 | +import static org.junit.Assert.assertFalse; |
20 | 21 | import static org.junit.Assert.assertNotNull; |
| 22 | +import static org.junit.Assert.assertTrue; |
21 | 23 |
|
22 | 24 | import java.util.Calendar; |
23 | 25 | import java.util.TimeZone; |
|
34 | 36 | import com.marklogic.client.DatabaseClient; |
35 | 37 | import com.marklogic.client.DatabaseClientFactory; |
36 | 38 | import com.marklogic.client.DatabaseClientFactory.Authentication; |
| 39 | +import com.marklogic.client.ResourceNotFoundException; |
37 | 40 | import com.marklogic.client.document.DocumentManager.Metadata; |
38 | 41 | import com.marklogic.client.document.DocumentWriteSet; |
39 | 42 | import com.marklogic.client.document.JSONDocumentManager; |
@@ -360,15 +363,18 @@ public void testPOJORepoDeleteDateTime() { |
360 | 363 | pojoReposProducts.delete(calTime); |
361 | 364 | // Introduce a wait for the document to be deleted. |
362 | 365 | try { |
363 | | - Thread.sleep(5000); |
364 | | - } catch (InterruptedException e) { |
| 366 | + artifact = pojoReposProducts.read(calTime); |
| 367 | + assertFalse("Test Expecting exception",true); |
| 368 | + } catch (ResourceNotFoundException e) { |
365 | 369 | // TODO Auto-generated catch block |
366 | | - e.printStackTrace(); |
| 370 | + assertTrue("expected exception",true); |
| 371 | + }catch (Exception e){ |
| 372 | + assertFalse("Test got unexpected",true); |
367 | 373 | } |
368 | 374 | // Validate the artifact read back. |
369 | | - long count = pojoReposProducts.count(); |
370 | | - |
371 | | - assertEquals("Artifact with calendar as Id found - Delete did not work",0, count); |
| 375 | +// long count = pojoReposProducts.count(); |
| 376 | +// |
| 377 | +// assertEquals("Artifact with calendar as Id found - Delete did not work",0, count); |
372 | 378 | } |
373 | 379 |
|
374 | 380 | @Test |
|
0 commit comments