Skip to content

Commit 0c2fa6b

Browse files
committed
Replace msn.com with msn.com/en-us/ to avoid redirection
Redirection leads to an extra page in Har and as result to failing tests. Change of URL allows to avoid redirection and tests work as expected.
1 parent 494c491 commit 0c2fa6b

File tree

1 file changed

+2
-3
lines changed
  • browsermob-legacy/src/test/java/net/lightbody/bmp/proxy

1 file changed

+2
-3
lines changed

browsermob-legacy/src/test/java/net/lightbody/bmp/proxy/HarTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import net.lightbody.bmp.core.har.HarEntry;
66
import net.lightbody.bmp.core.har.HarLog;
77
import net.lightbody.bmp.core.har.HarNameValuePair;
8-
import net.lightbody.bmp.core.har.HarNameVersion;
98
import net.lightbody.bmp.core.har.HarPage;
109
import net.lightbody.bmp.core.har.HarPageTimings;
1110
import net.lightbody.bmp.core.har.HarPostData;
@@ -444,7 +443,7 @@ public void testEntryFieldsPopulatedForHttp() throws IOException, InterruptedExc
444443
proxy.newHar("testEntryFieldsPopulatedForHttp");
445444

446445
// not using localhost so we get >0ms timing
447-
HttpGet get = new HttpGet("http://www.msn.com");
446+
HttpGet get = new HttpGet("https://www.msn.com/en-us/");
448447
IOUtils.toStringAndClose(client.execute(get).getEntity().getContent());
449448

450449
proxy.endPage();
@@ -501,7 +500,7 @@ public void testEntryFieldsPopulatedForHttps() throws IOException, InterruptedEx
501500
proxy.newHar("testEntryFieldsPopulatedForHttps");
502501

503502
// not using localhost so we get >0ms timing
504-
HttpGet get = new HttpGet("https://www.msn.com");
503+
HttpGet get = new HttpGet("https://www.msn.com/en-us/");
505504
IOUtils.toStringAndClose(client.execute(get).getEntity().getContent());
506505

507506
proxy.endPage();

0 commit comments

Comments
 (0)