Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2015-03-21 12:52:13 -0400
committerRyan D. Brooks2015-04-23 12:27:32 -0400
commit635257f7f1ae194fe25a8b41274210d998f0d1fc (patch)
treeaf9affdf6149cadaa9a40d0b26f754974bb81c07
parent9394c01dd6004ad052a46f0492862c7f04fcb0ee (diff)
downloadorg.eclipse.osee-single_page_app.tar.gz
org.eclipse.osee-single_page_app.tar.xz
org.eclipse.osee-single_page_app.zip
find resource locator bugsingle_page_app
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DoesNotWorkItemAts.java75
1 files changed, 54 insertions, 21 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DoesNotWorkItemAts.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DoesNotWorkItemAts.java
index 5bffea8abc..c5cca7ca97 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DoesNotWorkItemAts.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/DoesNotWorkItemAts.java
@@ -10,19 +10,25 @@
*******************************************************************************/
package org.eclipse.osee.ats.util;
-import java.util.Collection;
-import java.util.Collections;
-import org.eclipse.osee.ats.api.IAtsWorkItem;
-import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
-import org.eclipse.osee.ats.core.util.AtsUtilCore;
-import org.eclipse.osee.ats.internal.AtsClientService;
-import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery;
-import org.eclipse.osee.framework.skynet.core.artifact.search.QueryBuilderArtifact;
+import java.net.URI;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.logging.Level;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.UriBuilder;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.osee.framework.core.client.OseeClientProperties;
+import org.eclipse.osee.framework.jdk.core.type.OseeStateException;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.plugin.core.util.Jobs;
import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
+import org.eclipse.osee.jaxrs.client.JaxRsClient;
+import org.eclipse.osee.jdbc.JdbcClient;
+import org.eclipse.osee.jdbc.JdbcClientBuilder;
/**
* @author Donald G. Dunne
@@ -30,26 +36,53 @@ import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
public class DoesNotWorkItemAts extends XNavigateItemAction {
public DoesNotWorkItemAts(XNavigateItem parent) {
- super(parent, "Does Not Work - ATS - Test AtsQuery", PluginUiImage.ADMIN);
+ super(parent, "Does Not Work - ATS - URL Test", PluginUiImage.ADMIN);
}
@Override
public void run(TableLoadOption... tableLoadOptions) {
- Artifact teamArt =
- ArtifactQuery.getArtifactFromAttribute(AtsAttributeTypes.AtsId, "ATS16", AtsUtilCore.getAtsBranch());
+ Job background = new Job("Testing") {
- QueryBuilderArtifact queryBuilder = ArtifactQuery.createQueryBuilder(AtsUtilCore.getAtsBranch());
- queryBuilder.and(AtsAttributeTypes.AtsId, Collections.singleton("ATS16"));
- Artifact teamArt2 = queryBuilder.getResults().getOneOrNull();
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
- Collection<IAtsWorkItem> items =
- AtsClientService.get().getQueryService().createQuery().andAttr(AtsAttributeTypes.AtsId,
- Collections.singleton("ATS16")).getItems();
+ JdbcClient build =
+ JdbcClientBuilder.oracle("lba9", "sun817.msc.az.boeing.com", 1521).dbUsername("osee_client").dbPassword(
+ "osee_client").build();
- System.out.println("team " + teamArt);
- System.out.println("team2 " + teamArt2);
- System.out.println("items " + items);
+ final AtomicInteger oracleExceptions = new AtomicInteger(0);
+ final AtomicInteger serverExceptions = new AtomicInteger(0);
+ int counter = 0;
+ while (true) {
+ try {
+
+ String appServer = OseeClientProperties.getOseeApplicationServer();
+ System.out.println(counter++);
+ URI uri = UriBuilder.fromUri(appServer).path("lba/promote/engrbuild/teamdef/2010115").build();
+ String result =
+ JaxRsClient.newClient().target(uri).request(MediaType.APPLICATION_JSON).get(String.class);
+
+ if (!result.contains("AFejmw6LyzZ32ZTxMfAA")) {
+ throw new OseeStateException("Unexpected result [%s]", result);
+ }
+ } catch (Exception ex) {
+ String errorStr = String.format("Server Exceptions %s ", ex.getMessage());
+ System.err.println(errorStr);
+ serverExceptions.incrementAndGet();
+ OseeLog.log(org.eclipse.osee.ats.internal.Activator.class, Level.SEVERE, errorStr, ex);
+ }
+
+ // try {
+ // Thread.sleep(200);
+ // } catch (InterruptedException ex) {
+ // // do nothing
+ // }
+ }
+
+ }
+ };
+ Jobs.startJob(background);
}
}

Back to the top