public virtual void testConcurrentFetchAndDelete() { // given string processInstanceId = deployAndStartProcess(PROCESS_WITH_USERTASK).Id; //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final org.camunda.bpm.engine.task.Attachment attachment = taskService.createAttachment("anAttachmentType", null, processInstanceId, "anAttachmentName", null, "http://camunda.com"); Attachment attachment = taskService.createAttachment("anAttachmentType", null, processInstanceId, "anAttachmentName", null, "http://camunda.com"); ThreadControl asyncThread = executeControllableCommand(new AsyncThread(this, attachment.Id)); // assume assertThat(taskService.getAttachment(attachment.Id), notNullValue()); asyncThread.waitForSync(); commandExecutor.execute(new CommandAnonymousInnerClass(this, attachment)); // when asyncThread.makeContinue(); asyncThread.waitUntilDone(); // then assertThat(taskService.getAttachment(attachment.Id), nullValue()); }
public CommandAnonymousInnerClass(CompetingHistoricAttachmentPartitioningTest outerInstance, Attachment attachment) { this.outerInstance = outerInstance; this.attachment = attachment; }