Skip to content

Commit 0f7aeef

Browse files
committed
verbosity - lets see if we can resolve the Windows rspec issue
1 parent 263cb36 commit 0f7aeef

File tree

7 files changed

+20
-6
lines changed

7 files changed

+20
-6
lines changed

ext/iodine/fio-stl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98207,6 +98207,7 @@ FIO_IFUNC fio_ipc_s *fio___ipc_copy(const fio_ipc_s *ipc) {
9820798207
if (!ipc)
9820898208
return NULL;
9820998209
fio_ipc_s *cpy = fio___ipc_new(ipc->len + 16);
98210+
FIO_ASSERT_ALLOC(cpy);
9821098211
FIO_MEMCPY(cpy, ipc, sizeof(*cpy) + ipc->len);
9821198212
if ((uintptr_t)(cpy->from) + 1 > 1) /* tests exclude + NULL */
9821298213
cpy->from = fio_io_dup(cpy->from); /* copy owns its own ref */

spec/connection_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def self.on_close(c)
4848

4949
before(:context) do
5050
$stdout.puts "DEBUG: before(:context) start"; $stdout.flush
51-
Iodine.verbosity = 2 # floor: ERROR+FATAL visible in CI
51+
5252
Iodine.workers = 0
5353
Iodine.threads = 1 # raw IO needs only one worker thread
5454
$stdout.puts "DEBUG: config done, registering on_state"; $stdout.flush

spec/http_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def self.call(env)
8181
HTTP_STARTED = [false] # rubocop:disable RSpec/LeakyConstantDeclaration
8282

8383
before(:context) do
84-
Iodine.verbosity = 2 # floor: ERROR+FATAL visible in CI
84+
8585
Iodine.workers = 0
8686
Iodine.threads = 4 # async HTTP clients need worker threads
8787

spec/runtime_spec.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,17 @@
214214
# These run as ordinary synchronous RSpec examples.
215215
# ---------------------------------------------------------------------------
216216
RSpec.describe 'Iodine configuration (no reactor)' do
217-
before(:each) { Iodine.verbosity = 2 } # floor: ERROR+FATAL visible in CI
217+
before(:all) do
218+
@original_verbosity = Iodine.verbosity # Should be TEST_VERBOSITY (5) from spec_helper
219+
end
220+
221+
before(:each) do
222+
Iodine.verbosity = 2 # floor for config API tests (lower than TEST_VERBOSITY)
223+
end
224+
225+
after(:all) do
226+
Iodine.verbosity = @original_verbosity
227+
end
218228

219229
# -----------------------------------------------------------------------
220230
# Iodine.verbosity

spec/spec_helper.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@
66
# Add spec/support to load path so helpers can be required without full paths
77
$LOAD_PATH.unshift(File.join(__dir__, 'support'))
88

9+
# Test verbosity level: 1=fatal, 2=error, 3=warning, 4=info, 5=debug
10+
TEST_VERBOSITY = 5
11+
912
RSpec.configure do |config|
1013
# Ensure FIO_LOG_FATAL messages (printed before abort() via FIO_ASSERT) are
1114
# always visible in CI output. Level 1 = FATAL only; individual specs may
1215
# raise this but should not lower it below 1.
13-
Iodine.verbosity = 2 # floor: ERROR+FATAL visible in CI (level 1=fatal, 2=error, 3=warning, 4=info, 5=debug)
16+
Iodine.verbosity = TEST_VERBOSITY # DEBUG: all C extension messages visible for CI diagnostics
1417

1518
config.expect_with :rspec do |expectations|
1619
expectations.include_chain_clauses_in_custom_matcher_descriptions = true

spec/subscription_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
r[:handler_swap] = { old_fired: false, new_fired: false, new_msg: nil }
102102
r[:cancelled_no_delivery] = { received: false }
103103

104-
Iodine.verbosity = 2 # floor: ERROR+FATAL visible in CI
104+
105105
Iodine.workers = 0
106106
Iodine.threads = 1
107107

spec/support/iodine_test_batch.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test(key, &block)
4545

4646
# Start Iodine once, run all registered tests, stop, return results.
4747
def start!(extra_setup: nil)
48-
Iodine.verbosity = 2 # floor: ERROR+FATAL visible in CI
48+
4949
Iodine.workers = @workers
5050
Iodine.threads = @threads
5151

0 commit comments

Comments
 (0)