Fix bug with unnecessary plugin auto-update attempts
Summary: I've noticed that Flipper is trying to schedule auto-update for some plugins on every startup even though they are already updated. I found this happens because of a race condition when the auto-updater can be triggered before plugins initialised. This diff fixes that. Reviewed By: passy Differential Revision: D28312086 fbshipit-source-id: 66b0bd2aa9dfede1737d565b1e7e7845c940405e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
32f276b499
commit
0dce247741
@@ -768,6 +768,7 @@ test('test determinePluginsToProcess for mutilple clients having plugins present
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
initialised: true,
|
||||
};
|
||||
const op = determinePluginsToProcess(
|
||||
[client1, client2, client3],
|
||||
@@ -842,6 +843,7 @@ test('test determinePluginsToProcess for no selected plugin present in any clien
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
initialised: true,
|
||||
};
|
||||
const op = determinePluginsToProcess([client1, client2], device1, plugins);
|
||||
expect(op).toBeDefined();
|
||||
@@ -893,6 +895,7 @@ test('test determinePluginsToProcess for multiple clients on same device', async
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
initialised: true,
|
||||
};
|
||||
const op = determinePluginsToProcess([client1, client2], device1, plugins);
|
||||
expect(op).toBeDefined();
|
||||
@@ -982,6 +985,7 @@ test('test determinePluginsToProcess for multiple clients on different device',
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
initialised: true,
|
||||
};
|
||||
const op = determinePluginsToProcess(
|
||||
[client1Device1, client2Device1, client1Device2, client2Device2],
|
||||
@@ -1067,6 +1071,7 @@ test('test determinePluginsToProcess to ignore archived clients', async () => {
|
||||
marketplacePlugins: [],
|
||||
installedPlugins: new Map(),
|
||||
uninstalledPlugins: new Set(),
|
||||
initialised: true,
|
||||
};
|
||||
const op = determinePluginsToProcess(
|
||||
[client, archivedClient],
|
||||
|
||||
Reference in New Issue
Block a user