Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2018-09-07 12:57:51 -0400
committerDonald Dunne2018-09-11 12:52:23 -0400
commitd1b300a781c052bb3aea11c7dd6915e9bc58ba49 (patch)
tree3cf7ebfc2d8fd22602edeb3128e6e16cb6a45119
parented8a5b3032d42067d63267f639a7a571f74e6c76 (diff)
downloadorg.eclipse.osee-d1b300a781c052bb3aea11c7dd6915e9bc58ba49.tar.gz
org.eclipse.osee-d1b300a781c052bb3aea11c7dd6915e9bc58ba49.tar.xz
org.eclipse.osee-d1b300a781c052bb3aea11c7dd6915e9bc58ba49.zip
bug[ats_TW10547]: Intermittent test failure in ATS peer review
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsWorkItem.java2
-rw-r--r--plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java2
-rw-r--r--plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java6
-rw-r--r--plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java5
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java7
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java5
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java6
7 files changed, 33 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsWorkItem.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsWorkItem.java
index 8d938d6279..9a4fa185a6 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsWorkItem.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/IAtsWorkItem.java
@@ -85,4 +85,6 @@ public interface IAtsWorkItem extends IAtsObject, HasAssignees {
boolean isPeerReview();
+ void clearCaches();
+
}
diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
index 9e2867a18a..23a0a22d4d 100644
--- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
+++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/util/IAtsStoreService.java
@@ -69,4 +69,6 @@ public interface IAtsStoreService {
boolean isOfType(IAtsObject atsObject, IArtifactType artifactType);
+ void clearCaches(IAtsWorkItem workItem);
+
}
diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java
index 4b7ec5e528..5fb351b537 100644
--- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java
+++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java
@@ -28,6 +28,7 @@ import org.eclipse.osee.ats.api.user.IAtsUserService;
import org.eclipse.osee.ats.api.util.IAtsChangeSet;
import org.eclipse.osee.ats.api.util.IAtsStoreService;
import org.eclipse.osee.ats.core.client.internal.store.AtsChangeSet;
+import org.eclipse.osee.ats.core.workflow.WorkItem;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
@@ -190,4 +191,9 @@ public class AtsStoreService implements IAtsStoreService {
return isOfType(AtsClientService.get().getArtifact(atsObject), artifactType);
}
+ @Override
+ public void clearCaches(IAtsWorkItem workItem) {
+ ((WorkItem) workItem).clearCaches();
+ }
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java
index f71cdd5381..58381fd15c 100644
--- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java
+++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockWorkItem.java
@@ -266,4 +266,9 @@ public class MockWorkItem implements IAtsWorkItem {
public boolean isOfType(ArtifactTypeId... artifactTypes) {
return false;
}
+
+ @Override
+ public void clearCaches() {
+ // do nothing
+ }
}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java
index 4908220411..c8833f6a72 100644
--- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/WorkItem.java
@@ -320,4 +320,11 @@ public class WorkItem extends AtsObject implements IAtsWorkItem {
return services.getStoreService().isOfType(this.getStoreObject(), artifactTypes);
}
+ @Override
+ public void clearCaches() {
+ stateMgr = null;
+ atsLog = null;
+ match = null;
+ }
+
}
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java
index 1636955f02..9d64e9a5e2 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsChangeSet.java
@@ -101,6 +101,11 @@ public class AtsChangeSet extends AbstractAtsChangeSet {
listener.changesStored(this);
}
notifier.sendNotifications(getNotifications());
+ for (IAtsObject atsObject : new ArrayList<>(atsObjects)) {
+ if (atsObject instanceof IAtsWorkItem) {
+ atsServer.getStoreService().clearCaches((IAtsWorkItem) atsObject);
+ }
+ }
/**
* Commented out on 0.25.0 due to performance issues; No users are using this feature. Will be re-enabled on
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
index aacf2e3ca1..a3f73ba312 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/AtsStoreServiceImpl.java
@@ -30,6 +30,7 @@ import org.eclipse.osee.ats.api.workdef.IAttributeResolver;
import org.eclipse.osee.ats.api.workflow.log.IAtsLogFactory;
import org.eclipse.osee.ats.api.workflow.state.IAtsStateFactory;
import org.eclipse.osee.ats.core.util.AtsObjects;
+import org.eclipse.osee.ats.core.workflow.WorkItem;
import org.eclipse.osee.ats.rest.IAtsServer;
import org.eclipse.osee.framework.core.data.ArtifactId;
import org.eclipse.osee.framework.core.data.ArtifactTypeId;
@@ -182,4 +183,9 @@ public class AtsStoreServiceImpl implements IAtsStoreService {
return isOfType(atsObject.getStoreObject(), artifactType);
}
+ @Override
+ public void clearCaches(IAtsWorkItem workItem) {
+ ((WorkItem) workItem).clearCaches();
+ }
+
}

Back to the top