Project

General

Profile

Bug #13129

Intermittent failures in native MS test_records_should_have_options tests

Added by Dominic Cleal over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
DHCP
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Intermittent test failures on Ruby 1.8.7 from the following two native MS DHCP tests:

undefined method `[]' for nil:NilClass (NoMethodError)
/var/lib/workspace/workspace/test_proxy_develop_pr_core/puppet/2.6.0/ruby/1.8.7/modules/dhcp_native_ms/dhcp_native_ms_main.rb:148:in `loadRecordOptions'
/var/lib/workspace/workspace/test_proxy_develop_pr_core/puppet/2.6.0/ruby/1.8.7/test/dhcp_ms_native/server_ms_test.rb:188:in `test_records_should_have_options'
undefined method `[]' for nil:NilClass (NoMethodError)
/var/lib/workspace/workspace/test_proxy_develop_pr_core/puppet/2.6.0/ruby/1.8.7/modules/dhcp_native_ms/dhcp_native_ms_main.rb:148:in `loadRecordOptions'
/var/lib/workspace/workspace/test_proxy_develop_pr_core/puppet/2.6.0/ruby/1.8.7/test/dhcp_ms_native/server_ms_test.rb:196:in `test_records_should_have_options_and_values'

It appears that @subnet_service.all_leases("172.29.205.0").first is likely returning nil.


Related issues

Related to Smart Proxy - Bug #4148: Unable to delete DHCP reservations on MS DCHP serversResolved2014-01-21
Related to Smart Proxy - Bug #5481: Foreman Proxy unable to remove DHCP reservation: "IP / mac - is static - unable to delete"Resolved2014-04-28
Related to Smart Proxy - Bug #2320: Foreman Proxy on Windows: Vendor Class not found ErrorDuplicate2013-03-14

Associated revisions

Revision b9309bfb (diff)
Added by Dmitri Dolguikh over 3 years ago

Fixes #13129: fixes intermittent test failures in ms dhcp server

On older rubies the order of keys after hashmap merge is non-deterministic,
leading to intermittent test errors in this bit of code:
https://github.com/theforeman/smart-proxy/commit/62c9e22d#diff-153f490da42393cfc00b0e0f25a5d53cR265.

This code is broken (there are several reports about broken behavour:
http://projects.theforeman.org/issues/10556,
http://projects.theforeman.org/issues/5481,
http://projects.theforeman.org/issues/4148), to fix the tests the option parser
has been modified.

History

#1 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dmitri Dolguikh
  • Pull request https://github.com/theforeman/smart-proxy/pull/362 added

#2 Updated by Dmitri Dolguikh over 3 years ago

  • Related to Bug #4148: Unable to delete DHCP reservations on MS DCHP servers added

#3 Updated by Dmitri Dolguikh over 3 years ago

  • Related to Bug #5481: Foreman Proxy unable to remove DHCP reservation: "IP / mac - is static - unable to delete" added

#4 Updated by Dominic Cleal over 3 years ago

  • Category changed from Tests to DHCP
  • Legacy Backlogs Release (now unused) set to 123

#5 Updated by Anonymous over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#6 Updated by Dmitri Dolguikh over 3 years ago

  • Related to Bug #2320: Foreman Proxy on Windows: Vendor Class not found Error added

Also available in: Atom PDF