Commit a096f3a
authored
internal/plugintest: Switch from (os.File).Readdir() to os.ReadDir() (#1056)
Reference: https://pkg.go.dev/os#File.Readdir
Reference: https://pkg.go.dev/os#ReadDir
While attempting to troubleshoot macOS kernel panic behaviors while running acceptance testing, I was able to capture a log whose last entry was `Symlinking source directories to work directory`. Since that operation tends to occur in temporary directory space, there is at least some potential there for strange macOS and Go behaviors.
The `(os.File).Readdir()` method does make this mention in particular:
> Most clients are better served by the more efficient ReadDir method.
Making this a branch so others potentially affected by macOS kernel panics can try this out. This may not be the root cause, as there is a lot more process-oriented logic that occurs to start and stop providers in the testing framework, but if nothing else it could help performance slightly.1 parent ef65fde commit a096f3a
1 file changed
+18
-57
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 31 | | |
69 | 32 | | |
70 | 33 | | |
71 | 34 | | |
72 | | - | |
| 35 | + | |
73 | 36 | | |
74 | 37 | | |
75 | | - | |
| 38 | + | |
76 | 39 | | |
77 | 40 | | |
78 | 41 | | |
79 | 42 | | |
80 | | - | |
| 43 | + | |
81 | 44 | | |
82 | 45 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 46 | + | |
| 47 | + | |
89 | 48 | | |
90 | | - | |
| 49 | + | |
91 | 50 | | |
92 | 51 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
102 | 55 | | |
103 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
104 | 64 | | |
105 | | - | |
| 65 | + | |
| 66 | + | |
106 | 67 | | |
0 commit comments