Skip to content

Commit 47f4884

Browse files
committed
5
1 parent f94554a commit 47f4884

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

pkg/windows/windowsupdate/mem_test.go

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"runtime"
77
"testing"
88

9-
"github.com/go-ole/go-ole"
9+
"github.com/go-ole/go-ole/oleutil"
1010
"github.com/kolide/launcher/pkg/windows/oleconv"
1111
"github.com/scjalliance/comshim"
1212
"github.com/shirou/gopsutil/v3/process"
@@ -23,23 +23,16 @@ func TestMemory(t *testing.T) {
2323
session, err := NewUpdateSession()
2424
require.NoError(t, err)
2525

26-
searcher, err := session.CreateUpdateSearcher()
27-
require.NoError(t, err)
28-
29-
fmt.Println("before getting name ID")
26+
fmt.Println("created update session")
3027
takeAndPrintMemoryUsageSnapshot(t)
3128

32-
/*
33-
searchVariant, err := oleutil.CallMethod(searcher.disp, "Search", "Type='Software'")
34-
require.NoError(t, err)
35-
*/
36-
displayID, err := searcher.disp.GetSingleIDOfName("Search")
29+
searcher, err := session.CreateUpdateSearcher()
3730
require.NoError(t, err)
3831

39-
fmt.Println("before Search")
32+
fmt.Println("created update searcher")
4033
takeAndPrintMemoryUsageSnapshot(t)
4134

42-
searchVariant, err := searcher.disp.Invoke(displayID, ole.DISPATCH_METHOD, "Type='Software'")
35+
searchVariant, err := oleutil.CallMethod(searcher.disp, "Search", "Type='Software'")
4336
require.NoError(t, err)
4437

4538
fmt.Println("after Search")

0 commit comments

Comments
 (0)