summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKai Shi <kaishi@google.com>2020-05-21 16:20:52 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-05-21 16:20:52 +0000
commit8dddd90021f0d9419a3caf4cd07ba4c5af8746c7 (patch)
tree457426b936d0be421811e659726bc8b1e5c01474 /tests
parent25ada1ff4b9782d3175a1d5fd93e97a1559bcb84 (diff)
parent7ac44dcfd673f0408ecfa668bf05dea637bad2a0 (diff)
Merge "Increase security bonus score to 40 and reduce rssi cap" into rvc-dev
Diffstat (limited to 'tests')
-rw-r--r--tests/wifitests/src/com/android/server/wifi/CandidateScorerTest.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/wifitests/src/com/android/server/wifi/CandidateScorerTest.java b/tests/wifitests/src/com/android/server/wifi/CandidateScorerTest.java
index 7562da206..7b45848f7 100644
--- a/tests/wifitests/src/com/android/server/wifi/CandidateScorerTest.java
+++ b/tests/wifitests/src/com/android/server/wifi/CandidateScorerTest.java
@@ -156,8 +156,8 @@ public class CandidateScorerTest extends WifiBaseTest {
*/
@Test
public void testPreferHigherRssi() throws Exception {
- assertThat(evaluate(mCandidate1.setScanRssi(-63)),
- greaterThan(evaluate(mCandidate2.setScanRssi(-64))));
+ assertThat(evaluate(mCandidate1.setScanRssi(-70)),
+ greaterThan(evaluate(mCandidate2.setScanRssi(-71))));
}
/**
@@ -174,9 +174,9 @@ public class CandidateScorerTest extends WifiBaseTest {
*/
@Test
public void testPreferTheCurrentNetworkEvenIfRssiDifferenceIsSignificant() throws Exception {
- assertThat(evaluate(mCandidate1.setScanRssi(-65).setCurrentNetwork(true)
+ assertThat(evaluate(mCandidate1.setScanRssi(-76).setCurrentNetwork(true)
.setPredictedThroughputMbps(433)),
- greaterThan(evaluate(mCandidate2.setScanRssi(-57)
+ greaterThan(evaluate(mCandidate2.setScanRssi(-69)
.setPredictedThroughputMbps(433))));
}
@@ -248,12 +248,15 @@ public class CandidateScorerTest extends WifiBaseTest {
*/
@Test
public void testAboveSaturationDoNotSwitchAwayEvenWithALargeRssiDifference() throws Exception {
- int goodRssi = mScoringParams.getGoodRssi(mCandidate1.getFrequency());
+ int currentRssi = (mExpectedExpId == ThroughputScorer.THROUGHPUT_SCORER_DEFAULT_EXPID)
+ ? mScoringParams.getSufficientRssi(mCandidate1.getFrequency()) :
+ mScoringParams.getGoodRssi(mCandidate1.getFrequency());
int unbelievablyGoodRssi = -1;
- assertThat(evaluate(mCandidate1.setScanRssi(goodRssi).setCurrentNetwork(true)),
+ assertThat(evaluate(mCandidate1.setScanRssi(currentRssi).setCurrentNetwork(true)),
greaterThan(evaluate(mCandidate2.setScanRssi(unbelievablyGoodRssi))));
}
+
/**
* Prefer high throughput network.
*/