Author: adietish
Date: 2010-08-25 10:10:40 -0400 (Wed, 25 Aug 2010)
New Revision: 24425
Added:
trunk/usage/tests/org.jboss.tools.usage.test/UsageTestSuite.launch
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java
Removed:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingEnablementTest.java
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmenTest.java
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmentFake.java
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageIntegrationTest.java
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java
Log:
[JBIDE-6376] tests refactored
Added: trunk/usage/tests/org.jboss.tools.usage.test/UsageTestSuite.launch
===================================================================
--- trunk/usage/tests/org.jboss.tools.usage.test/UsageTestSuite.launch
(rev 0)
+++ trunk/usage/tests/org.jboss.tools.usage.test/UsageTestSuite.launch 2010-08-25 14:10:40
UTC (rev 24425)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application"
value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation"
value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="false"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location"
value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry
value="/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER"
value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR"
value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME"
value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND"
value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER"
value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/JVM
1.5"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE"
value="org.jboss.tools.usage.test.UsageTestSuite"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS"
value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl
${target.nl}"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR"
value="org.jboss.tools.usage.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER"
value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product"
value="com.jboss.jbds.product.product"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<stringAttribute key="selected_target_plugins"
value="org.eclipse.ui.workbench.texteditor@default:default,com.springsource.javax.servlet.jsp@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.databinding@default:default,org.apache.lucene@default:default,org.eclipse.core.filesystem.macosx@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.security.macosx@default:false,org.apache.lucene.analysis@default:default,org.eclipse.ui.ide@default:default,com.ibm.icu@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.transforms.hook@default:false,org.eclipse.equinox.p2.repository@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.junit4@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.osgi@-1:true,org.eclipse.equinox.common@2:true,org.eclipse.core.databinding.property@default:default,or!
g.eclipse.swt@default:default,javax.transaction@default:false,org.eclipse.compare.core@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.text@default:default,org.eclipse.core.variables@default:default,javax.servlet@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.core.resources@default:default,org.eclipse.ui.views@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.app@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.help.base@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.p2.metadata@default:default,org.apache.jasper@default:default,org.mortbay.jetty.util@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,o!
rg.eclipse.core.databinding.observable@default:default,org.ecl!
ipse.ecf
.provider.filetransfer@default:default,org.eclipse.swt.cocoa.macosx@default:false,org.apache.commons.el@default:default,org.eclipse.ant.core@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,com.springsource.org.apache.commons.logging@default:default,org.jboss.tools.xulrunner.initializer@default:false,com.springsource.javax.el@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.equinox.security@default:default,org.mortbay.jetty.server@default:default,org.eclipse.ui.cocoa@default:false,org.eclipse.equinox.p2.engine@default:default,org.eclipse.jface.text@default:default,org.eclipse.ui.intro.universal@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.help.ui@default:default,org.eclipse.equinox.http.jetty@d!
efault:default,org.eclipse.ui.forms@default:default,org.hamcrest.core@default:default,org.eclipse.core.runtime@default:true,org.apache.ant@default:default,com.springsource.javax.servlet@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ui@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.jface@default:default,org.eclipse.help@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ui.intro@default:default,com.jboss.jbds.product@default:default"/>
+<stringAttribute key="selected_workspace_plugins"
value="org.jboss.tools.usage.test@default:default,org.jboss.tools.usage@default:default"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
Property changes on: trunk/usage/tests/org.jboss.tools.usage.test/UsageTestSuite.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmenTest.java
===================================================================
---
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmenTest.java 2010-08-25
13:46:45 UTC (rev 24424)
+++
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmenTest.java 2010-08-25
14:10:40 UTC (rev 24425)
@@ -37,15 +37,9 @@
*/
public class EclipseEnvironmenTest {
- private static final String GANALYTICS_ACCOUNTNAME = "UA-17645367-1";
- private static final String HOSTNAME = "jboss.org";
- private static final String REFERRAL = "0";
- private static final String LOCALE_US = "en_US";
-
@Test
public void testMacOs() {
- EclipseEnvironment eclipseEnvironment = new
EclipseEnvironmentFake(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL,
- Platform.OS_MACOSX, LOCALE_US);
+ EclipseEnvironment eclipseEnvironment = new
EclipseEnvironmentFake(Platform.OS_MACOSX);
String userAgent = eclipseEnvironment.getUserAgent();
assertApplicationNameAndVersion("com.jboss.jbds.product", "3.0.1",
userAgent);
assertOs("Macintosh", "Intel Mac OS X 10.5", userAgent);
@@ -54,8 +48,7 @@
@Test
public void testLinux() {
- EclipseEnvironment eclipseEnvironment = new
EclipseEnvironmentFake(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL,
- Platform.OS_LINUX, LOCALE_US);
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(Platform.OS_LINUX);
String userAgent = eclipseEnvironment.getUserAgent();
assertApplicationNameAndVersion("com.jboss.jbds.product", "3.0.1",
userAgent);
assertOs("X11", "Linux i686", userAgent);
@@ -64,8 +57,7 @@
@Test
public void testWindows() {
- EclipseEnvironment eclipseEnvironment = new
EclipseEnvironmentFake(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL,
- Platform.OS_WIN32, LOCALE_US);
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(Platform.OS_WIN32);
String userAgent = eclipseEnvironment.getUserAgent();
assertApplicationNameAndVersion("com.jboss.jbds.product", "3.0.1",
userAgent);
assertOs("Windows", "Windows NT 6.1", userAgent);
@@ -74,8 +66,7 @@
@Test
public void testKeyword() {
- EclipseEnvironment eclipseEnvironment = new
EclipseEnvironmentFake(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL,
- Platform.OS_WIN32, LOCALE_US) {
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake() {
@Override
protected Bundle[] getBundles() {
return new Bundle[] {
@@ -96,7 +87,7 @@
assertTrue(keyword.indexOf(JBossBundleGroups.BundleGroup.SEAM.name()) >= 0);
assertTrue(keyword.indexOf(JBossBundleGroups.BundleGroup.SMOOKS.name()) >= 0);
}
-
+
private void assertApplicationNameAndVersion(String applicationName, String
applicationVersion, String userAgent) {
Matcher matcher =
Pattern.compile("([a-zA-Z\\.]+)/([0-9\\.]+).+").matcher(userAgent);
assertTrue(matcher.matches());
@@ -119,7 +110,7 @@
assertEquals(1, matcher.groupCount());
assertEquals(language, matcher.group(1));
}
-
+
private class BundleSymbolicNameFake implements Bundle {
private String symbolicName;
@@ -242,12 +233,11 @@
throw new UnsupportedOperationException();
}
}
-
+
@Test
public void testVisitsOnFirstVisit() {
EclipsePreferencesFake preferences = new EclipsePreferencesFake();
- EclipseEnvironment eclipseEnvironment = new
EclipseEnvironmentFake(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL,
- Platform.OS_LINUX, LOCALE_US, preferences);
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(preferences);
String firstVisit = eclipseEnvironment.getFirstVisit();
assertEquals(1, eclipseEnvironment.getVisitCount());
assertEquals(firstVisit, eclipseEnvironment.getLastVisit());
@@ -258,8 +248,7 @@
@Test
public void testVisitsOnSecondVisit() throws InterruptedException {
EclipsePreferencesFake preferences = new EclipsePreferencesFake();
- EclipseEnvironment eclipseEnvironment = new
EclipseEnvironmentFake(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL,
- Platform.OS_LINUX, LOCALE_US, preferences);
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(preferences);
String firstVisit = eclipseEnvironment.getFirstVisit();
Thread.sleep(10);
eclipseEnvironment.visit();
@@ -273,8 +262,7 @@
@Test
public void testVisitsOnThirdVisit() throws InterruptedException {
EclipsePreferencesFake preferences = new EclipsePreferencesFake();
- EclipseEnvironment eclipseEnvironment = new
EclipseEnvironmentFake(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL,
- Platform.OS_LINUX, LOCALE_US, preferences);
+ EclipseEnvironment eclipseEnvironment = new EclipseEnvironmentFake(preferences);
String firstVisit = eclipseEnvironment.getFirstVisit();
Thread.sleep(10);
eclipseEnvironment.visit();
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmentFake.java
===================================================================
---
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmentFake.java 2010-08-25
13:46:45 UTC (rev 24424)
+++
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/EclipseEnvironmentFake.java 2010-08-25
14:10:40 UTC (rev 24425)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.usage.test;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.jboss.tools.usage.reporting.EclipseEnvironment;
@@ -18,15 +19,33 @@
*/
public class EclipseEnvironmentFake extends EclipseEnvironment {
+ public static final String GANALYTICS_ACCOUNTNAME = "UA-17645367-1";
+ public static final String HOSTNAME = "jboss.org";
+ public static final String REFERRAL = "0";
+ public static final String LOCALE_US = "en_US";
+
private String locale;
private String os;
- public EclipseEnvironmentFake(String accountName, String hostName, String referral,
String os, String locale, IEclipsePreferences preferences) {
+ public EclipseEnvironmentFake() {
+ this(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL, Platform.OS_LINUX, LOCALE_US);
+ }
+
+ public EclipseEnvironmentFake(String platform) {
+ this(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL, platform, LOCALE_US);
+ }
+
+ public EclipseEnvironmentFake(IEclipsePreferences preferences) {
+ this(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL, Platform.OS_LINUX, LOCALE_US,
preferences);
+ }
+
+ public EclipseEnvironmentFake(String accountName, String hostName, String referral,
String os, String locale,
+ IEclipsePreferences preferences) {
super(accountName, hostName, referral, preferences);
this.os = os;
this.locale = locale;
}
-
+
public EclipseEnvironmentFake(String accountName, String hostName, String referral,
String os, String locale) {
this(accountName, hostName, referral, os, locale, new EclipsePreferencesFake());
}
@@ -60,7 +79,7 @@
protected String getOS() {
return os;
}
-
+
@Override
protected String getApplicationVersion() {
return "3.0.1";
Deleted:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingEnablementTest.java
===================================================================
---
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingEnablementTest.java 2010-08-25
13:46:45 UTC (rev 24424)
+++
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingEnablementTest.java 2010-08-25
14:10:40 UTC (rev 24425)
@@ -1,141 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.usage.test;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
-
-import org.jboss.tools.usage.GlobalUsageReportingEnablement;
-import org.junit.Test;
-
-/**
- * The Class GlobalReportingEnablementTest.
- */
-public class GlobalUsageReportingEnablementTest {
-
- @Test
- public void canExtractEnabledValue() throws IOException {
- GlobalReportingEnablementFake reportEnablement = new
GlobalReportingEnablementFake("ENABLED");
- assertTrue(reportEnablement.isEnabled());
- }
-
- @Test
- public void canExtractDisabledValue() throws IOException {
- GlobalReportingEnablementFake reportEnablement = new
GlobalReportingEnablementFake("DISABLED");
- assertTrue(reportEnablement.isEnabled());
- }
-
- @Test
- public void canExtractDisabledOutUndefinedValue() throws IOException {
- GlobalReportingEnablementFake reportEnablement = new
GlobalReportingEnablementFake("Rubbish");
- assertTrue(reportEnablement.isEnabled());
- }
-
- private class GlobalReportingEnablementFake extends GlobalUsageReportingEnablement {
-
- private String enablementValue;
-
- public GlobalReportingEnablementFake(String enablementValue) throws IOException {
- super(JBossToolsUsageTestActivator.getDefault());
- this.enablementValue = enablementValue;
- }
-
- @Override
- protected InputStreamReader request(String url) throws UnsupportedEncodingException {
- return new InputStreamReader(new
ByteArrayInputStream(getEnablementPageContent(enablementValue).getBytes()),
"UTF-8");
-
- }
- }
-
- private String getEnablementPageContent(String enablementValue) {
- return "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\""
- + "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
"
- + " "
- + " "
- + "<html
xmlns=\"http://www.w3.org/1999/xhtml\"
xml:lang=\"en\" lang=\"en\"> "
- + "<head> "
- + " <title> JBoss Tools / JBoss Developer Studio Usage Reporting
Enablement - JBoss Community</title> "
- + " "
- + " <meta http-equiv=\"X-UA-Compatible\"
content=\"IE=EmulateIE7\" /> "
- + " "
- + " <script type=\"text/javascript\"> "
- + " var javascriptIsCool = false;"
- + " </script> "
- + " "
- + "</head> "
- + "<body class=\"jive-body-content jive-body-content-document\"
> "
- + " <div id=\"jive-body\"> "
- + " "
- + "<div class=\"jive-content\"> "
- + " <div class=\"jive-content-header\"> "
- + " <div class=\"jive-wiki-post-moderating
jive-content-header-moderating\"> "
- + " <span class=\"jive-icon-med
jive-icon-moderation\"></span>Currently Being Moderated"
- + " </div> "
- + " <div class=\"jive-content-title\"> "
- + " <h2><span class=\"jive-icon-big
jive-icon-document\"></span> JBoss Tools / JBoss Developer Studio Usage
Reporting Enablement</h2> "
- + " </div> "
- + " <div class=\"jive-content-header-version\"> "
- + " VERSION 5 "
- + " <a
href=\"/wiki/JBossToolsJBossDeveloperStudioUsageReportingEnablement/diff?secondVersionNumber=5\"
title=\"Click to view article history\"><img class=\"jive-icon-sml
jive-icon-search\" src=\"/4.0.5/images/transparent.png\" alt=\"Click
to view article history\" /></a> "
- + " </div> "
- + " <div class=\"jive-content-header-details\"> "
- + " "
- + "Created on: Aug 24, 2010 5:39 AM by"
- + "<a href=\"/people/adietish\""
- + "id=\"jive-72036899,987,346,482,238\""
- +
"onmouseover=\"quickuserprofile.getUserProfileTooltip(72036);\""
- + "onmouseout=\"quickuserprofile.cancelTooltip();\""
- + "class=\"jiveTT-hover-user jive-username-link\""
- + ">Andre Dietisheim</a> <span>-</span> "
- + "Last Modified: "
- + "Aug 24, 2010 5:53 AM"
- + "by <a href=\"/people/adietish\""
- + "id=\"jive-72036899,987,347,353,238\""
- +
"onmouseover=\"quickuserprofile.getUserProfileTooltip(72036);\""
- + "onmouseout=\"quickuserprofile.cancelTooltip();\""
- + "class=\"jiveTT-hover-user jive-username-link\""
- + ">Andre Dietisheim</a> </div> "
- + " "
- + " </div> "
- + " <div class=\"jive-content-body\"> "
- + " "
- + "<!-- [DocumentBodyStart:e26c60c0-cb73-47b7-bded-f4eb7320305b]
--><div class=\"jive-rendered-content\"><p>This article is
queried by the JBoss Tools / JBoss Developer Studio usage reporting plugin. It implements
a global kill-switch that allows us to disable usage reporting stats. The plugin looks for
a string of the format:</p><p style=\"min-height: 8pt; height: 8pt; padding:
0px;\"> </p><p><strong>Usage 
Reporting  is <"
-
- + enablementValue
-
- + "></strong>. Any value that differs from ENABLED is interpreted
as DISABLED.</p><p style=\"min-height: 8pt; height: 8pt; padding:
0px;\"> </p><h1>Usage Reporting is
ENABLED</h1></div><!--
[DocumentBodyEnd:e26c60c0-cb73-47b7-bded-f4eb7320305b] --> "
- + " "
- + " </div> "
- + " <div class=\"jive-content-footer\"> "
- + " "
- + " "
- + " <!-- BEGIN content details --> "
- + " <span class=\"jive-content-footer-item\"> "
- + " 18 Views</a> "
- + " </span> "
- + " "
- + " "
- + " </div> "
- + "</div> "
- + "</body> "
- + "</html> ";
- }
-
- @Test
- public void isPageAccessible() throws IOException {
- GlobalUsageReportingEnablement reportEnablement = new
GlobalUsageReportingEnablement(JBossToolsUsageTestActivator.getDefault());
- System.err.println("Usage reporting is globally \"" +
reportEnablement.isEnabled() + "\"");
- }
-}
Copied:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java
(from rev 24391,
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingEnablementTest.java)
===================================================================
---
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java
(rev 0)
+++
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java 2010-08-25
14:10:40 UTC (rev 24425)
@@ -0,0 +1,141 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.usage.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+
+import org.jboss.tools.usage.GlobalUsageReportingSettings;
+import org.junit.Test;
+
+/**
+ * The Class GlobalReportingEnablementTest.
+ */
+public class GlobalUsageReportingSettingsTest {
+
+ @Test
+ public void canExtractEnabledValue() throws IOException {
+ GlobalReportingEnablementFake reportEnablement = new
GlobalReportingEnablementFake("ENABLED");
+ assertTrue(reportEnablement.isEnabled());
+ }
+
+ @Test
+ public void canExtractDisabledValue() throws IOException {
+ GlobalReportingEnablementFake reportEnablement = new
GlobalReportingEnablementFake("DISABLED");
+ assertTrue(reportEnablement.isEnabled());
+ }
+
+ @Test
+ public void canExtractDisabledOutUndefinedValue() throws IOException {
+ GlobalReportingEnablementFake reportEnablement = new
GlobalReportingEnablementFake("Rubbish");
+ assertTrue(reportEnablement.isEnabled());
+ }
+
+ private class GlobalReportingEnablementFake extends GlobalUsageReportingSettings {
+
+ private String enablementValue;
+
+ public GlobalReportingEnablementFake(String enablementValue) throws IOException {
+ super(JBossToolsUsageTestActivator.getDefault());
+ this.enablementValue = enablementValue;
+ }
+
+ @Override
+ protected InputStreamReader request(String url) throws UnsupportedEncodingException {
+ return new InputStreamReader(new
ByteArrayInputStream(getEnablementPageContent(enablementValue).getBytes()),
"UTF-8");
+
+ }
+ }
+
+ private String getEnablementPageContent(String enablementValue) {
+ return "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Transitional//EN\""
+ + "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
"
+ + " "
+ + " "
+ + "<html
xmlns=\"http://www.w3.org/1999/xhtml\"
xml:lang=\"en\" lang=\"en\"> "
+ + "<head> "
+ + " <title> JBoss Tools / JBoss Developer Studio Usage Reporting
Enablement - JBoss Community</title> "
+ + " "
+ + " <meta http-equiv=\"X-UA-Compatible\"
content=\"IE=EmulateIE7\" /> "
+ + " "
+ + " <script type=\"text/javascript\"> "
+ + " var javascriptIsCool = false;"
+ + " </script> "
+ + " "
+ + "</head> "
+ + "<body class=\"jive-body-content jive-body-content-document\"
> "
+ + " <div id=\"jive-body\"> "
+ + " "
+ + "<div class=\"jive-content\"> "
+ + " <div class=\"jive-content-header\"> "
+ + " <div class=\"jive-wiki-post-moderating
jive-content-header-moderating\"> "
+ + " <span class=\"jive-icon-med
jive-icon-moderation\"></span>Currently Being Moderated"
+ + " </div> "
+ + " <div class=\"jive-content-title\"> "
+ + " <h2><span class=\"jive-icon-big
jive-icon-document\"></span> JBoss Tools / JBoss Developer Studio Usage
Reporting Enablement</h2> "
+ + " </div> "
+ + " <div class=\"jive-content-header-version\"> "
+ + " VERSION 5 "
+ + " <a
href=\"/wiki/JBossToolsJBossDeveloperStudioUsageReportingEnablement/diff?secondVersionNumber=5\"
title=\"Click to view article history\"><img class=\"jive-icon-sml
jive-icon-search\" src=\"/4.0.5/images/transparent.png\" alt=\"Click
to view article history\" /></a> "
+ + " </div> "
+ + " <div class=\"jive-content-header-details\"> "
+ + " "
+ + "Created on: Aug 24, 2010 5:39 AM by"
+ + "<a href=\"/people/adietish\""
+ + "id=\"jive-72036899,987,346,482,238\""
+ +
"onmouseover=\"quickuserprofile.getUserProfileTooltip(72036);\""
+ + "onmouseout=\"quickuserprofile.cancelTooltip();\""
+ + "class=\"jiveTT-hover-user jive-username-link\""
+ + ">Andre Dietisheim</a> <span>-</span> "
+ + "Last Modified: "
+ + "Aug 24, 2010 5:53 AM"
+ + "by <a href=\"/people/adietish\""
+ + "id=\"jive-72036899,987,347,353,238\""
+ +
"onmouseover=\"quickuserprofile.getUserProfileTooltip(72036);\""
+ + "onmouseout=\"quickuserprofile.cancelTooltip();\""
+ + "class=\"jiveTT-hover-user jive-username-link\""
+ + ">Andre Dietisheim</a> </div> "
+ + " "
+ + " </div> "
+ + " <div class=\"jive-content-body\"> "
+ + " "
+ + "<!-- [DocumentBodyStart:e26c60c0-cb73-47b7-bded-f4eb7320305b]
--><div class=\"jive-rendered-content\"><p>This article is
queried by the JBoss Tools / JBoss Developer Studio usage reporting plugin. It implements
a global kill-switch that allows us to disable usage reporting stats. The plugin looks for
a string of the format:</p><p style=\"min-height: 8pt; height: 8pt; padding:
0px;\"> </p><p><strong>Usage 
Reporting  is <"
+
+ + enablementValue
+
+ + "></strong>. Any value that differs from ENABLED is interpreted
as DISABLED.</p><p style=\"min-height: 8pt; height: 8pt; padding:
0px;\"> </p><h1>Usage Reporting is
ENABLED</h1></div><!--
[DocumentBodyEnd:e26c60c0-cb73-47b7-bded-f4eb7320305b] --> "
+ + " "
+ + " </div> "
+ + " <div class=\"jive-content-footer\"> "
+ + " "
+ + " "
+ + " <!-- BEGIN content details --> "
+ + " <span class=\"jive-content-footer-item\"> "
+ + " 18 Views</a> "
+ + " </span> "
+ + " "
+ + " "
+ + " </div> "
+ + "</div> "
+ + "</body> "
+ + "</html> ";
+ }
+
+ @Test
+ public void isPageAccessible() throws IOException {
+ GlobalUsageReportingSettings reportEnablement = new
GlobalUsageReportingSettings(JBossToolsUsageTestActivator.getDefault());
+ System.err.println("Usage reporting is globally \"" +
reportEnablement.isEnabled() + "\"");
+ }
+}
Property changes on:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GlobalUsageReportingSettingsTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java
===================================================================
---
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java 2010-08-25
13:46:45 UTC (rev 24424)
+++
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/GoogleAnalyticsUrlStrategyTest.java 2010-08-25
14:10:40 UTC (rev 24425)
@@ -14,7 +14,6 @@
import java.io.UnsupportedEncodingException;
-import org.eclipse.core.runtime.Platform;
import org.jboss.tools.usage.FocusPoint;
import org.jboss.tools.usage.googleanalytics.GoogleAnalyticsUrlStrategy;
import org.jboss.tools.usage.googleanalytics.IGoogleAnalyticsParameters;
@@ -26,11 +25,6 @@
*/
public class GoogleAnalyticsUrlStrategyTest {
- private static final String GANALYTICS_ACCOUNTNAME = "UA-17645367-1";
- private static final String HOSTNAME = "jboss.org";
- private static final String REFERRAL = "0";
- private static final String LOCALE_US = "en_US";
-
// private static final String COOKIE_DELIMITER = EncodingUtils.checkedEncodeUtf8(String
// .valueOf(IGoogleAnalyticsParameters.PLUS_SIGN));
@@ -38,7 +32,7 @@
@Before
public void setUp() {
- this.urlStrategy = new EclipseEnvironmentGAUrlStrategy();
+ this.urlStrategy = new GoogleAnalyticsUrlStrategy(new EclipseEnvironmentFake());
}
@Test
@@ -117,31 +111,4 @@
}
return value;
}
-
- private class EclipseEnvironmentGAUrlStrategy extends GoogleAnalyticsUrlStrategy {
-
- private EclipseEnvironmentGAUrlStrategy() {
- super(new EclipseEnvironmentFake(GANALYTICS_ACCOUNTNAME, HOSTNAME, REFERRAL,
Platform.OS_LINUX, LOCALE_US) {
-
- @Override
- public String getScreenColorDepth() {
- return "24-bit";
- }
-
- @Override
- public String getScreenResolution() {
- return "1920x1080";
- }
-
- @Override
- public String getBrowserLanguage() {
- return "en_us";
- }
-
- @Override
- public String getUserId() {
- return String.valueOf(System.currentTimeMillis());
- }});
- }
- }
}
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageIntegrationTest.java
===================================================================
---
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageIntegrationTest.java 2010-08-25
13:46:45 UTC (rev 24424)
+++
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageIntegrationTest.java 2010-08-25
14:10:40 UTC (rev 24425)
@@ -46,7 +46,7 @@
@Test
public void sameUserIdOnSametEclipseInstance() throws Exception {
UrlRevealingTracker tracker = getTracker(getEclipseEnvironmentInstance());
- FocusPoint focusPoint =
createFocusPoint("/testSameUserIdOnSametEclipseInstance" +
System.currentTimeMillis());
+ FocusPoint focusPoint =
createFocusPoint("testSameUserIdOnSametEclipseInstance" +
System.currentTimeMillis());
tracker.trackSynchronously(focusPoint);
String userId = getUserId(tracker.getTrackingUrl());
assertTrue(userId != null);
@@ -67,7 +67,7 @@
assertTrue(userId != null);
tracker = getTracker(createEclipseEnvironment());
- FocusPoint focusPoint =
createFocusPoint("/testDifferentUserIdOnDifferentEclipseInstance"
+ FocusPoint focusPoint =
createFocusPoint("testDifferentUserIdOnDifferentEclipseInstance"
+ System.currentTimeMillis());
tracker.trackSynchronously(focusPoint);
String newUserId = getUserId(tracker.getTrackingUrl());
@@ -133,6 +133,7 @@
try {
lock.lock();
super.trackAsynchronously(focusPoint);
+ lock.unlock();
} catch (Exception e) {
lock.unlock();
throw new RuntimeException(e);
@@ -141,9 +142,7 @@
@Override
protected String getTrackingUrl(FocusPoint focusPoint) throws
UnsupportedEncodingException {
- trackingUrl = super.getTrackingUrl(focusPoint);
- lock.unlock();
- return trackingUrl;
+ return trackingUrl = super.getTrackingUrl(focusPoint);
}
private String getTrackingUrl() {
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java
===================================================================
---
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java 2010-08-25
13:46:45 UTC (rev 24424)
+++
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/JBossToolsUsageRequestsTest.java 2010-08-25
14:10:40 UTC (rev 24425)
@@ -17,7 +17,6 @@
import org.jboss.tools.usage.HttpGetRequest;
import org.jboss.tools.usage.ILoggingAdapter;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
/**
@@ -32,567 +31,567 @@
this.loggingAdapter = new SystemOutLogger();
}
- @Ignore
- @Test
- public void testUrl0() throws IOException {
- String userAgent = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4)
Gecko/20100614 Ubuntu/10.04 (lucid) Firefox/10.0.0";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=338321265"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmje=1"
- + "&utmfl=10.1%20r53"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
+// @Ignore
+// @Test
+// public void testUrl0() throws IOException {
+// String userAgent = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4)
Gecko/20100614 Ubuntu/10.04 (lucid) Firefox/10.0.0";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338321265"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_0() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338321288"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_0"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D156032507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_1() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US;
rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) v201006010437R-H98-GA";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=3383212651"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_1"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D156030508.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_2() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US;
rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) Eclipse/3.5.0";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=3383212652"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_2"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D156030509.1285760712.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_3() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US;)
Eclipse/3.5.0";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=3383212651"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_3"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D156030501.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_4() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=3383212651"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_4"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D156030502.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_5() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Linux x86_64)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=33832126513"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_5"
+// + "&utmac=UA-17645367-1"
+// +
"&__utma%3D156030503.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_6() throws IOException {
+// String userAgent = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4)
Gecko/20100614 Ubuntu/10.04 (lucid) com.jboss.jbds.product/3.0.1";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338321265"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_6"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338321268"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_1() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64;
en-us)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338321068"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmje=1"
+// + "&utmfl=10.1%20r53"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_1"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_2() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=338333268"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=-%20JBoss%20Community"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_2"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D156620507.1285760111.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=311333268"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D112660507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_mac() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Macintosh; U; Intel Mac OS X
10.5; fr)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351333268"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_mac"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D133660507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351333254"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win"
+// + "&utmhid=1087431432"
+// + "&utmr=0"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D133660522.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_1() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=358333254"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_1"
+// + "&utmhid=1087431432"
+// + "&utmr=smooks|seam|drools|esb"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_1"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D133860522.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl8() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=453325272"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-US"
+// + "&utmdt=jboss.org-tools-usage-instance"
+// + "&utmhid=1722580305"
+// + "&utmr=org.jboss.tools.usage.tests"
+// + "&utmp=%2Fjboss.org%2Ftools%2Fusage%2FtestUrl8"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D999.69517276658961975851281943564260.1281943564259.1281943564259.1281943564259.-1%3B%2B__utmz%3D999.1281943564259.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_referral() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351334444"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win_referral"
+// + "&utmhid=1087431432"
+// + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
+// + "&utm_content=test1%7Ctest2%7Ctest3"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_referral"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D133663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_adcontent() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=378334444"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win_adcontent"
+// + "&utmhid=1087431432"
+// + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
+// + "&utm_content=test1%7Ctest2%7Ctest3%7test4"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_adcontent"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D455663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_keyword() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=378334354"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win_keyword"
+// + "&utmhid=1087431432"
+// + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
+// + "&term=test1%7Ctest2%7Ctest3%7test4"
+// + "&utm_term=test1a%7Ctest2a%7Ctest3a%7test4a"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_keyword"
+// + "&utmac=UA-17645367-1"
+// +
"&utmcc=__utma%3D887463892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_utmz() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351334444"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win__utmz"
+// + "&utmhid=1087431432"
+// + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
+// + "&utm_content=test1%7Ctest2%7Ctest3"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win__utmz"
+// + "&utmac=UA-17645367-1"
+// + "&utmz=test1%7Ctest2%7Ctest3"
+// +
"&utmcc=__utma%3D133663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_utmctr() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351334444"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win__utmctr"
+// + "&utmhid=1087431432"
+// + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
+// + "&utm_content=test1%7Ctest2%7Ctest3"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_utctr"
+// + "&utmac=UA-17645367-1"
+// + "&utmz=test1%7Ctest2%7Ctest3"
+// +
"&utmcc=__utma%3D133663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3D%7Cutmctr%3Dtest1%7Ctest2%7Ctest3%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
+//
+// @Ignore
+// @Test
+// public void testUrl0_7_3_win_utmctr_lengthtest() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=351334794"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-test_0_7_3_win_lengthtest"
+// + "&utmhid=1087431432"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_lengthtest"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc="
+// +
"__utma%3D133697892.1285760711.1281430767.1281430767.1281430767.1%3B%2B"
+// + "__utmz%3D156030500.1281430767.1.1."
+// + "utmcsr%3D(direct)%7C"
+// + "utmccn%3D(direct)%7C"
+// + "utmcmd%3D(none)%7C"
+// +
"utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
- @Ignore
@Test
- public void testUrl0_0() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=338321288"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmje=1"
- + "&utmfl=10.1%20r53"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_0"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D156032507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_1() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US;
rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) v201006010437R-H98-GA";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=3383212651"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmje=1"
- + "&utmfl=10.1%20r53"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_1"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D156030508.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_2() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US;
rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) Eclipse/3.5.0";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=3383212652"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmje=1"
- + "&utmfl=10.1%20r53"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_2"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D156030509.1285760712.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_3() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64; en-US;)
Eclipse/3.5.0";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=3383212651"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmje=1"
- + "&utmfl=10.1%20r53"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_3"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D156030501.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_4() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=3383212651"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmje=1"
- + "&utmfl=10.1%20r53"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_4"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D156030502.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_5() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Linux x86_64)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=33832126513"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmje=1"
- + "&utmfl=10.1%20r53"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_5"
- + "&utmac=UA-17645367-1"
- +
"&__utma%3D156030503.195542053.1281528584.1281528584.1281528584.1%3B%2B__utmz%3D156030500.1281528584.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_6() throws IOException {
- String userAgent = "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4)
Gecko/20100614 Ubuntu/10.04 (lucid) com.jboss.jbds.product/3.0.1";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=338321265"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmje=1"
- + "&utmfl=10.1%20r53"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_6"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=338321268"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmje=1"
- + "&utmfl=10.1%20r53"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_1() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64;
en-us)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=338321068"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmje=1"
- + "&utmfl=10.1%20r53"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_1"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D156030507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_2() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=338333268"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=-%20JBoss%20Community"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_2"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D156620507.1285760111.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_3() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (X11; U; Linux x86_64;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=311333268"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-test_0_7_3"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D112660507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_3_mac() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Macintosh; U; Intel Mac OS X
10.5; fr)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=351333268"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-test_0_7_3"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_mac"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D133660507.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_3_win() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=351333254"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-test_0_7_3_win"
- + "&utmhid=1087431432"
- + "&utmr=0"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D133660522.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_3_1() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=358333254"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-test_0_7_3_1"
- + "&utmhid=1087431432"
- + "&utmr=smooks|seam|drools|esb"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_1"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D133860522.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl8() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=453325272"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-US"
- + "&utmdt=jboss.org-tools-usage-instance"
- + "&utmhid=1722580305"
- + "&utmr=org.jboss.tools.usage.tests"
- + "&utmp=%2Fjboss.org%2Ftools%2Fusage%2FtestUrl8"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D999.69517276658961975851281943564260.1281943564259.1281943564259.1281943564259.-1%3B%2B__utmz%3D999.1281943564259.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_3_win_referral() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=351334444"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-test_0_7_3_win_referral"
- + "&utmhid=1087431432"
- + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
- + "&utm_content=test1%7Ctest2%7Ctest3"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_referral"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D133663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_3_win_adcontent() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=378334444"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-test_0_7_3_win_adcontent"
- + "&utmhid=1087431432"
- + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
- + "&utm_content=test1%7Ctest2%7Ctest3%7test4"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_adcontent"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D455663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_3_win_keyword() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=378334354"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-test_0_7_3_win_keyword"
- + "&utmhid=1087431432"
- + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
- + "&term=test1%7Ctest2%7Ctest3%7test4"
- + "&utm_term=test1a%7Ctest2a%7Ctest3a%7test4a"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_keyword"
- + "&utmac=UA-17645367-1"
- +
"&utmcc=__utma%3D887463892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_3_win_utmz() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=351334444"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-test_0_7_3_win__utmz"
- + "&utmhid=1087431432"
- + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
- + "&utm_content=test1%7Ctest2%7Ctest3"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win__utmz"
- + "&utmac=UA-17645367-1"
- + "&utmz=test1%7Ctest2%7Ctest3"
- +
"&utmcc=__utma%3D133663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_3_win_utmctr() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=351334444"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-test_0_7_3_win__utmctr"
- + "&utmhid=1087431432"
- + "&utmr=seam|esb|smooks|birt|bpel|cdi|deltacloud|drools"
- + "&utm_content=test1%7Ctest2%7Ctest3"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_utctr"
- + "&utmac=UA-17645367-1"
- + "&utmz=test1%7Ctest2%7Ctest3"
- +
"&utmcc=__utma%3D133663892.1285760711.1281430767.1281430767.1281430767.1%3B%2B__utmz%3D156030500.1281430767.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3D%7Cutmctr%3Dtest1%7Ctest2%7Ctest3%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Ignore
- @Test
- public void testUrl0_7_3_win_utmctr_lengthtest() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=351334794"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-test_0_7_3_win_lengthtest"
- + "&utmhid=1087431432"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl0_7_3_win_lengthtest"
- + "&utmac=UA-17645367-1"
- + "&utmcc="
- + "__utma%3D133697892.1285760711.1281430767.1281430767.1281430767.1%3B%2B"
- + "__utmz%3D156030500.1281430767.1.1."
- + "utmcsr%3D(direct)%7C"
- + "utmccn%3D(direct)%7C"
- + "utmcmd%3D(none)%7C"
- +
"utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
-
- @Test
public void testUrl_utmaCookies_0() throws IOException {
String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
@@ -682,33 +681,33 @@
assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
}
- @Test
- public void testUrl_utmaCookies_1B() throws IOException {
- String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
- TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
- String url = "http://www.google-analytics.com/__utm.gif?"
- + "utmwv=4.7.2"
- + "&utmn=261390794"
- + "&utmhn=jboss.org"
- + "&utmcs=UTF-8"
- + "&utmsr=1920x1080"
- + "&utmsc=24-bit"
- + "&utmul=en-us"
- + "&utmdt=tools-usage-testUrl_utmaCookies_1B"
- + "&utmhid=1087431432"
- + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_1B"
- + "&utmac=UA-17645367-1"
- + "&utmcc="
- + "__utma%3D133697892.1285760711.1281430767.1281430767.1281430867.2%3B%2B"
- + "__utmz%3D156030500.1281430767.1.1."
- + "utmcsr%3D(direct)%7C"
- + "utmccn%3D(direct)%7C"
- + "utmcmd%3D(none)%7C"
- +
"utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
- + "&gaq=1";
- method.request(url);
- assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
- }
+// @Test
+// public void testUrl_utmaCookies_1B() throws IOException {
+// String userAgent = "com.jboss.jbds.product/3.0.1 (Windows; U; Windows NT 6.1;
en-US)";
+// TestHttpGetMethod method = new TestHttpGetMethod(userAgent, loggingAdapter);
+// String url = "http://www.google-analytics.com/__utm.gif?"
+// + "utmwv=4.7.2"
+// + "&utmn=261390794"
+// + "&utmhn=jboss.org"
+// + "&utmcs=UTF-8"
+// + "&utmsr=1920x1080"
+// + "&utmsc=24-bit"
+// + "&utmul=en-us"
+// + "&utmdt=tools-usage-testUrl_utmaCookies_1B"
+// + "&utmhid=1087431432"
+// + "&utmp=%2Ftools%2Fusage%2FtestUrl_utmaCookies_1B"
+// + "&utmac=UA-17645367-1"
+// + "&utmcc="
+// +
"__utma%3D133697892.1285760711.1281430767.1281430767.1281430867.2%3B%2B"
+// + "__utmz%3D156030500.1281430767.1.1."
+// + "utmcsr%3D(direct)%7C"
+// + "utmccn%3D(direct)%7C"
+// + "utmcmd%3D(none)%7C"
+// +
"utmctr%3Dtest1%7Ctest2%7Ctest3%7Ctest4%7Ctest5%7Ctest6%7Ctest7%7Ctest8%7Ctest8%7Ctest9%7Ctest10%7Ctest11%7Ctest12%7Ctest13%7Ctest514%7Ctest14%7Ctest15%7Ctest16%7Ctest17%7Ctest18%7Ctest19%7Ctest20%7Ctest20%7Ctest21%7Ctest22%7Ctest23%7Ctest514%7Ctest24%7Ctest25%7Ctest26%7Ctest27%7Ctest28%7Ctest29%7Ctest30%7Ctest31%3B"
+// + "&gaq=1";
+// method.request(url);
+// assertEquals(HttpURLConnection.HTTP_OK, method.getResponseCode());
+// }
@Test
public void testUrl_utmaCookies_2() throws IOException {
Modified:
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java
===================================================================
---
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java 2010-08-25
13:46:45 UTC (rev 24424)
+++
trunk/usage/tests/org.jboss.tools.usage.test/src/org/jboss/tools/usage/test/UsageTestSuite.java 2010-08-25
14:10:40 UTC (rev 24425)
@@ -19,7 +19,7 @@
GoogleAnalyticsUrlStrategyTest.class,
JBossToolsUsageIntegrationTest.class,
EclipseEnvironmenTest.class,
- GlobalUsageReportingEnablementTest.class})
+ GlobalUsageReportingSettingsTest.class})
/**
* @author Andre Dietisheim