Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit a86138c

Browse files
author
Clément Le Provost
committed
[test] Fix test on user agent
The Android version number sometimes contains a `_rX` suffix.
1 parent eb7c982 commit a86138c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

algoliasearch/src/test/java/com/algolia/search/saas/IndexTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ public void doRequestCompleted(JSONObject content, AlgoliaException error) {
880880
public void testUserAgent() throws Exception {
881881
// Test the default value.
882882
String userAgent = (String) Whitebox.getInternalState(client, "userAgentRaw");
883-
assertTrue(userAgent.matches("^Algolia for Android \\([0-9.]+\\); Android \\(([0-9.]+|unknown)\\)$"));
883+
assertTrue(userAgent.matches("^Algolia for Android \\([0-9.]+\\); Android \\(([0-9.]+(_r[0-9]+)?|unknown)\\)$"));
884884

885885
// Manipulate the list.
886886
assertFalse(client.hasUserAgent(new Client.LibraryVersion("toto", "6.6.6")));

0 commit comments

Comments
 (0)